# Need help with mx transition

**URL:** <https://forum.kirupa.com/t/need-help-with-mx-transition/262487>\
**Category:** Uncategorized\
**Created:** [June 6, 2008, 11:09am UTC](https://forum.kirupa.com/t/need-help-with-mx-transition/262487 "2008-06-06T11:09:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quakers](https://avatars.discourse-cdn.com/v4/letter/q/b2d939/32.png) [@quakers](https://forum.kirupa.com/u/quakers)\
**Post date:** [June 6, 2008, 11:09am UTC](https://forum.kirupa.com/t/need-help-with-mx-transition/262487/1 "2008-06-06T11:09:31Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 6, 2008, 11:20am UTC](https://forum.kirupa.com/t/need-help-with-mx-transition/262487/2 "2008-06-06T11:20:37Z")

</div>

> tweenname.onMotionFinished = function(){  
> code here 😛  
> }

maybe

---

<div class="post-metadata">

**Author:** ![quakers](https://avatars.discourse-cdn.com/v4/letter/q/b2d939/32.png) [@quakers](https://forum.kirupa.com/u/quakers)\
**Post date:** [June 6, 2008, 12:18pm UTC](https://forum.kirupa.com/t/need-help-with-mx-transition/262487/3 "2008-06-06T12:18:27Z")

</div>

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