This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > August 2007 > Using MovieClipLoader Class to load swf
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using MovieClipLoader Class to load swf
|
|
| spamGactus 2007-08-29, 6:15 pm |
| I'm trying to split a movie into smaller swf files. This is an existing movie
who's load time is long, so I'm trying to decrease load time by putting the
major parts of the movie in separate swfs, and loading them on demand.
Currently, the major pages of the site are contained in movie clips, which are
placed each in a frame in a MC called "pages". The pages are called by the main
timeline by accessing each frame in the pages MC. I'm trying to replace these
movie clips with blank movie clips, and load the individual swfs using this
code:
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
loader.loadClip("Soupes.swf", pageHolder_mc);
at each frame.
The fla can be downloaded from www.cjreynolds.com/fuda36.zip - go to the
Chinoise Cuisine page, then select Soupes at the left. This is the one that I
have tried to modify. It doesn't come up. In the fla, this is frame 8 of the
pages movieclip.
| |
| dzedward 2007-08-29, 10:14 pm |
| var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
bytesTotal:Number):Void{
trace("Bytes Loaded: "+bytesLoaded+"-------"+"Bytes Total: "+bytesTotal);
};
myListener.onLoadInit = function(target:MovieClip):Void{
trace("Load Complete, first frame executed");
}
mcLoader.addListener(myListener);
mcLoader.loadClip("Soupes.swf", pageHolder_mc);
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|