FLASH:Actionscript:三角関数でボヨヨン

三角関数を使ってちょっとしたムービーを作ってみました.百聞は一見にしかず。

ボヨヨーンってなるところのメソッド。
stepを変更するとスピードが変わります。
yにはデフォルトの腕の部品のY軸の値。
r:はそれぞれの腕の部品(円)がどれぐらい移動するかの幅
function ballEnterFrame() {
degree += 360 + this.step;
radian = Math.PI / 180 * degree;
this._y = this.y + this.r * Math.cos(radian);
}
This entry was posted in FLASH Actionscript. Bookmark the permalink.

コメントをどうぞ

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>