all groups > flash actionscript > february 2007 >
You're in the

flash actionscript

group:

The Use of MovieClipLoader


Re: How use MovieClipLoader? Sketchsta
2/18/2007 12:00:00 AM
flash actionscript:
here is what im gonna be using... see if you can edit this to your needs..


//creates emptyMovieClip with instance name holder_mc
this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());
//creates a listener Object called mc_loader
var mc_listener:Object = new Object();
//this assigns a MovieClipLoader to holder_mc
var holder_mc:MovieClipLoader = new MovieClipLoader();
//here you attatch mc_listener to MovieClipLoader, to listen for certain things
holder_mc.addListener(mc_listener);
//here you load the external content, and place it into holder_mc
holder_mc.loadClip("your_file.mov", holder_mc);

//this tells mc_listener to execute a function, when the external data is
fully loaded
mc_listener.onLoadInit = function(target_mc:MovieClip) {
//to unload here, i used a onRelease() action
target_mc.onRelease = function() {
holder_mc.unloadClip(target_mc);
};
};
The Use of MovieClipLoader &Necromancer
2/18/2007 4:02:56 AM
Re: How use MovieClipLoader? Sketchsta
2/18/2007 4:18:34 AM
I dont know if you can load multiple files into the same movieClip...

to use movieClipLoader:

var my_mc:MovieClipLoader = new MovieClipLoader(this.getNextHighestDepth());
// to load into my_mc

my_mc.loadClip("your external file.mov", empty movieClip instance name);

you need to have an empty movie clip on stage to load into..

I guess you could probably use the same MovieClipLoader to load into different
emptyMovieClips on stage. Not sure, as i havent tried it..

hope this helps.
Re: How use MovieClipLoader? &Necromancer
2/18/2007 4:34:06 AM
And how can i now if the first one's playback is finished and it can start to
play the next one?
The main problem how can i play the files continously after each other. I take
the hint here that i can use the MovieClipLoader to make it.
Re: How use MovieClipLoader? Sketchsta
2/18/2007 5:09:02 AM
look into the unloadMovieClip class in the help files, they will tell you how
to use it.

im gonna look into it now aswell, it could be useful for a website im doing at
the moment.
if i find anything i'll let you know.
Re: How use MovieClipLoader? &Necromancer
2/18/2007 5:12:20 AM
Re: How use MovieClipLoader? &Necromancer
2/19/2007 1:57:32 AM
I take the hint, i use NetStream class for this task. It can use to play back local files?
It is a little bit complex for me.Where can i find simple description for it?
AddThis Social Bookmark Button