I have the following code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
btn_packages.onRelease = function (){
var myTween:Tween = new Tween(contents, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 10, false);
myTween.onMotionFinished = function (){
_root.contents.unloadMovie("main_content.swf");
_root.contents._alpha=100;
_root.contents.loadMovie("packages.swf");
}
}
_root.contents.loadMovie("main_content.swf");
It basically does what I want it to do, except that it is skipping the actionscript in the packages.swf.
I am new to actionscript, so I am probably doing something wrong with the Tween, but can’t seem to figure it out. When I initially load the “main_content.swf” everything loads fine, and the AS is run correctly. When I click the link to invoke the tween and load the corresponding movie it fades out properly, the new one loads with the preloader, and seems to run ok, but then it gets to the stop(), pauses and keeps starting itself over.
If I run the packages.swf independently it runs how it should. Stops where it should etc… so I am assuming that the problem is in the above code.
Any help would be greatly appreciated.