KitchenSync SequenceFunction
メソッドのシーケンス。こりゃ便利。
♥0 |
Line 35 |
Modified 2011-01-23 02:56:30 |
MIT License
archived:2017-03-20 07:45:28
ActionScript3 source code
/**
* Copyright fakestar0826 ( http://wonderfl.net/user/fakestar0826 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/jQMZ
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
import org.as3lib.kitchensync.KitchenSync;
import org.as3lib.kitchensync.action.*;
import org.as3lib.kitchensync.action.group.*;
import org.as3lib.kitchensync.core.*;
public class FlashTest extends Sprite {
private var tf:TextField;
public function FlashTest() {
// write as3 code here..
tf = new TextField();
addChild(tf);
KitchenSync.initialize(this);
var ks1:KSFunction = new KSFunction(say1, "0.5sec", "Hello");
var ks2:KSFunction = new KSFunction(say2, "0.5sec", " World,");
var ks3:KSFunction = new KSFunction(say3, "0.5sec", " 193");
var seq:IActionGroup = new KSSequenceGroup(
ks1, ks2, ks3
);
seq.start();
}
private function say1(word:String):void
{
tf.appendText(word);
}
private function say2(word:String):void
{
tf.appendText(word);
}
private function say3(word:String):void
{
tf.appendText(word);
}
}
}