home > April 2008

fuseを順番に実行する方法

April 09, 2008

SampleFunc(1);//関数実行

//関数定義
function SampleFunc(n:Number){
switch(n){
case 1:
var sampFuse:Fuse = new Fuse();
sampFuse.autoClear = true;
sampFuse.push([〜A〜scope:this, func:"SampleFunc", args:2]);
sampFuse.start();
break;
case 2:
var sampFuse:Fuse = new Fuse();
sampFuse.autoClear = true;
sampFuse.push([〜B〜scope:this, func:"SampleFunc", args:3]);
sampFuse.start();
break;
・・・
}
}

これでプレビューするとA→Bと順番に実行されます。

Posted at 02:37 AM | Comments (0)

destroy()

April 08, 2008

fuseを止めたい時に使う関数。


var sampFuse:Fuse = new Fuse();
sampFuse.autoClear = true;
sampFuse.push([

]);
sampFuse.start();

というfuseを書いた場合、
sampFuse.destroy();
でfuseを止める事ができます。

Posted at 08:32 PM | Comments (0)

newline

April 01, 2008

改行文字です。恥ずかしながら知りませんでした。

var myName:String = "publicroots", myAge:Number = 29;
trace(myName+newline+myAge);

//出力
publicroots
29

Posted at 01:25 AM | Comments (0)