package myproject{
import jp.nium.graphics.Circle;
import jp.nium.graphics.Square;
import jp.progression.casts.*;
import jp.progression.commands.*;
import jp.progression.events.*;
import jp.progression.loader.*;
import jp.progression.Progression;
import jp.progression.scenes.*;
import fl.transitions.easing.Elastic;
public class MyScene extends SceneObject {
public var cast:CastSprite;
public var s,c;
public function MyScene( name:String ) {
super( name );
cast = new CastSprite();
s = cast.addChild( new Square() );
c = cast.addChild( new Circle() );
cast.onCastAdded = function():void {
cast.addCommand(
new DoTween( s, {
x :100,
y :100
},Elastic.easeInOut , 500 ),
new DoTween( c, {
x :200,
y :10,
alpha : 0.5
},Elastic.easeInOut , 1000 )
);
};
cast.onCastRemoved = function():void {
cast.addCommand(
new DoTween( s, {
x :0,
y :0
}, Elastic.easeInOut, 500 ),
new DoTween( c, {
x :0,
y :0
}, Elastic.easeInOut, 500 )
);
};
}
// init イベントを受け取る
protected override function _onInit():void {
cast.parallelMode = true;
this.addCommand( new AddChild( progression.container, cast ) );
}
// goto イベントを受け取る
protected override function _onGoto():void {
cast.parallelMode = false;
this.addCommand( new RemoveChild( progression.container, cast ));
}
}
}
最終更新:2008年04月15日 02:12