multimedia design, Actionscript, Lingo, PHP, Perl, SQL
9月
11

LinearGo, CONSTRUCTORの引数

Filed under: Actionscript3, GoASAP | Tags: GoItem, , | 9月 11th, 2008
Post

LinearGoがコアな関数ぽいので引数を調査してみる。
デフォルト引数が設定されているので空でもかまわない。
これだけ引数があるとrepeaterだけ設定したい時とかちょっとめんどくさい。
サブクラスを作って使う方が簡単そう。

ドキュメントにもサブクラスは簡単に作れるしその方が便利だよ、サブクラスでsuper()するのを忘れないで(相当意訳)てサ。

function LinearGo(
	delay	 		: Number=NaN,
	duration 		: Number=NaN,
	easing 			: Function=null,
	extraEasingParams	: Array=null,
	repeater		: LinearGoRepeater=null,
	useRelative		: Boolean=false,
	useRounding		: Boolean=false,
	useFrames		: Boolean=false,
	pulseInterval		: Number=NaN )

delay:0
	待機時間(秒)

duration:1
	経過時間(秒)

easing:easeOut
function easeOut(t:Number, b:Number, c:Number, d:Number) : Number {
	return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
};
	イージング関数、fl.motion.easing.*が使用できる。

repeater:LinearGoRepeater
	繰返し指定

useRelative:false

useRounding:false
	GoItem.correctValueの結果に影響
	false:Number, true:int

useFrames
	なんか特別な時に使うらしい

pulseInterval:NaN(-1)
	現在のフレームレートを使用する

repeater:LinearGoRepeaterはこちらで確認できます。
LinearGoRepeaterでtweenを繰返し、CONSTRUCTORの引数

Bookmark and Share

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt=""> <pre lang="" line="" escaped="">