I am trying to duplicate an effect used on a template gallery that I have for my photo website. (I want to have bigger images so am re-writing myself).
I am able to achieve the effect I want using the tween class. My problem is that after the tween has finished I want the movie to move to a particular frame ( or even the next frame if specifying a frame isn’t possible).
This is my actionscript code but when the tween has finished, it doesn’t move to the next frame.
Could some kind person tell me where I am going wrong.
Thank you.
// Import the Tween class and the easing package
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Global variables
var scaleTo = 500; // We will scale the image to 500%
stop();
// add the onPress handler to the movieclip
btn_inv1.onPress = doTween;
// Do the scaling tween on the MovieClip
function doTween(){
var yScaleT:Tween = new Tween(my_mc, "_xscale", Strong.easeOut, 5, scaleTo, 5, true);
var yScaleT:Tween = new Tween(my_mc, "_yscale", Strong.easeOut, 5, scaleTo, 5, true);
var yScaleT:Tween = new Tween(my_mc, "_x", Strong.easeOut, my_mc._x, 30, 5, true);
var yScaleT:Tween = new Tween(my_mc, "_y", Strong.easeOut, my_mc._y, 120, 5, true);
};
yScaleT.onMotionFinished = function() {
this.nextFrame();
};