loadMovie with Fade effect
- June 19th, 2010
- Posted in Flash
- Write comment
The best way to do that in actionscript 2 is to import the transition library and then check if the movie loaded and create the alpha effect
import mx.transitions.Tween;
import mx.transitions.easing.*;
loadMovie(“home.swf”, movie_loader);
this.onEnterFrame = function() {
if (movie_loader.getBytesLoaded()>=movie_loader.getBytesTotal() && movie_loader.getBytesLoaded()>1) {
Tween1 = new Tween(movie_loader, “_alpha”, Strong.easeIn, 0, 100, 1, true);
delete this.onEnterFrame;
}
};
Stop();
No comments yet.