Need help with mx transition

I have to make a small flash site and I want to use mx.transitions for smooth animation between info/images.
The problem is that when I push the button to finish the transition I don’t know how to advance to the next frame.

The code is on the first frame - when the object enters the stage:
(z1 is the instance of the mc)

*[COLOR=DarkRed]new mx.transitions.Tween(z1, “_x”, mx.transitions.easing.Elastic.easeOut, 0, 300, 3, true);[/COLOR]

The code on the button - when the object exists the stage:

[COLOR=DarkRed]on (press) {
new mx.transitions.Tween(z1, “_x”, mx.transitions.easing.Elastic.easeOut, 300, 600, 3, true);
}

[/COLOR]*[COLOR=Black]I know that exists the event handler[/COLOR][COLOR=Black] **.onMotionFinished **,but I don’t know how to use to advance to next frame in the movie.

Thanks
[/COLOR]

tweenname.onMotionFinished = function(){
code here :stuck_out_tongue:
}

maybe

tryed, won’t work. It doesn’t wait for the finish of mx.transition and skipped to next frame :frowning: