Showing posts with label loadMovie. Show all posts
Showing posts with label loadMovie. Show all posts

Wednesday, June 11, 2008

Intro/Outro

This used to be a really simple task, but it's quite the ordeal in as3, but I figured it out:
View it Here
download fla's

It seems like there should be a way easier way of doing this.

Issues this covers: load movie, tween class, enter frame, target paths, variables
oh by the way, you have to do targets like this now:
MovieClip(this.parent.parent.parent).loadNextMovie(); //tell main timeline to call loadNextMovie function from loaded movie's timeline

Tuesday, June 10, 2008

new loadMovie

You don't need a container to load an external file anymore:

var loadMovie = new Loader();
addChild(loadMovie );
loadMovie .load(new URLRequest("page1.swf"));

but if you do want it to load into a certain movie or container, do it like this:
var loadMovie = new Loader();
container_mc.addChild(loadMovie );
loadMovie .load(new URLRequest("page1.swf"));

Apparently you can't just load a new movie in place of the new one anymore. You have to boot the old one out and then load in the new one:
container.removeChild(loadMovie);
loadMovie = new Loader();
container.addChild(loadMovie);
loadMovie.load(new URLRequest("page2.swf"));

Talking to the new movie's timeline is different too,
you'll have to cast it (it's called):
MovieClip(loadMovie.content).gotoAndStop("outro");

So far the new way to load a movie is the most annoying change about as3.