# Transition

**URL:** <https://forum.kirupa.com/t/transition/245525>\
**Category:** Uncategorized\
**Created:** [November 30, 2007, 4:14pm UTC](https://forum.kirupa.com/t/transition/245525 "2007-11-30T16:14:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [November 30, 2007, 4:14pm UTC](https://forum.kirupa.com/t/transition/245525/1 "2007-11-30T16:14:30Z")

</div>

Hi, I want to load a new movie using AS, after an transition animation has played once a button has been clicked … \>  
here is my code: (ps using lacos motion tween btw)

#include “lmc\_tween.as”  
var t:Number = transition\_mc.\_xscale;  
var ys:Number = 400;

function nextpage(){  
\_root.onEnterFrame = function(){  
if (t\>ys){  
\_root.loadMovie(“success.swf”);  
}  
}  
}

button\_mc.onPress = function(){

```
transition_mc.tween(["_xscale","_yscale","_alpha"],[500,500,100],1);
nextpage();

trace(t);

```

}

However … It doesnt work ☹ the onEnterFrame isnt fireing, although t IS greater than ys by that point… What has gone wrong? Any Suggestions!?
