Hi everybody,
I am learning to work with the tween class, using the tutorial here at Kirupa.com.
I am using Flash MX 2004 Profesional. The code is:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xScaleT:Tween = new Tween(kText, "_rotation", Elastic.easeOut, 0, 360, 3, true);
var xPosT:Tween = new Tween(kText, "_x", Bounce.easeOut, 0, Stage.width, 3, true);
xScaleT.onMotionFinished = function() {
this.yoyo();
};
xPosT.onMotionFinished = function() {
this.continueTo(Stage.width / 2, 3);
};
The first part of the code works great, but the onMotionFinished event does not work, and I get the following output message:
Error Scene=Scene 1, layer=actions, frame=1:Line 6: There is no property with the name ‘onMotionFinished’.
xScaleT.onMotionFinished = function() {
Error Scene=Scene 1, layer=actions, frame=1:Line 9: There is no property with the name ‘onMotionFinished’.
xPosT.onMotionFinished = function() {
Can anyone help me?
Thanks a lot