Finish loading, then continue?

in a buttons code, how would i say finish loading, then play.

here is what i have

btn.onRelease = function(){
loadMovie(movie.swf);
//finish loading code goes here
gotoAndPlay(“label”);
}

search the forums for MovieClipLoader - you should find examples - it can be set up to notify when an item is finished loading

Why not put the “label” within the movie.swf and time the playing from there?

its an example…

what im getting at is an object(not necessarily a swf) is being loaded onRelease, but i need it to fully load before the button’s actions, however the object is being loaded with the same button.

MovieClipLoader works with swfs, jpgs, pngs etc… or are you loading a data? If loading data, you need to use LoadVars? does that help?

not really.

How can i say this? When the button is pressed, an object is loaded(img or swf) which has a preloader. I need to wait until that loader completes, then make a transition or whatever.

so…like the example above (in Lehman’s)

onRelease = function(){
load something
make sure it finishes loading
if it finishes loading, do some action
}

onRelease = function(){
load something - [COLOR=“Red”]use MovieClipLoader.loadClip()[/COLOR]
make sure it finishes loading - [COLOR=“red”]use MovieClipLoader.onLoadInit[/COLOR]
if it finishes loading, do some action
}
You can also use [COLOR=“red”]MovieClipLoader.onLoadProgress [/COLOR]as an alternative to a preloader.

A search in the Flash Help files for the text in red will actually provide examples of what you want to achieve.