Hi guys, I have a questions about the using of TimelineLite(),
I hope to move two objects at the same time, and the rotation of one of both will be changed after a short delay,
so my code is shown below:
private var timeline:TimelineLite = new TimelineLite();
timeline.add( new TweenLite(obj1, 1, {x:0, y:15,z:15}),0); // move obj1
timeline.add( new TweenLite(obj2, 1, {x:0, y:-15,z:-15}),0);// move obj2
timeline.add(Obj_Rotater(obj1,0,0,20),3); // rotate obj1 along Z-axis after 3 second
private function Obj_Rotater(obj:ObjectContainer3D,rx:Number,ry:Number,rz:Number):void
{
obj.rotationX = rx;
obj.rotationY = ry;
obj.rotationZ = rz;
}
However, when the code is running, the Obj_Rotater function is executed immediately with the above two TweenLite function.
Is there any suggestion to help me ?
Thanks!!