In starling we can easily used greensock library. Sometime we need to add two property at the same time on different objects, By using TimelineLite we can do this. here is the code which represents the following.
var timeline:TimelineLite = new TimelineLite([
TweenLite.to(winImage, 3.5, {x : DeviceWidth/2- winImage.width/2 , y : 50, scaleX : Constant.scaleX, scaleY : Constant.scaleY, ease : Linear.easeIn, onComplete : addParticle}),
TweenLite.to(winText , 3.5 , { x: winImage.width/2 , y : winImage.height/2 , ease : Linear.easeIn})
]);
Here in first TweenLite winImage is animating and in same time wintext also. You can add more property insde one declaration, also you can use others properties also
0 Comment(s)