Link to home
Start Free TrialLog in
Avatar of Refael
RefaelFlag for United States of America

asked on

preloader

I have a simple button in flash with action to load movie when released.
“on (release) { LoadMovieNum ("brazil.swf" ,2);}”

How is it possible to add a function to the “release” that it will check first if the “brazil” movie is completely loaded and if not it will run a “preloader”. Since I have couple of buttons like this on stage I will have to do this to all the buttons but I do not know how.

i hope you understand as i am new in flash :-)
thanks.
Avatar of Montoya
Montoya

That depends. What version of Flash are you using, please?

Avatar of Refael

ASKER

oh sorry, i use flash mx PRO 2004
ASKER CERTIFIED SOLUTION
Avatar of Montoya
Montoya

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, of course you would put all that inside your onRelease...

For example, inside the function, which is inside your release statement,  you could put..

mclListener.onLoadInit = function(target_mc:MovieClip) {    //what to do when the clip has loaded. This is what you're looking for.
 
_global.loadingDone:String = "done";

};

If(loadingDone != "done"){

//load your preloader here
}


Avatar of Refael

ASKER

well i will try to follow this but i am a bit confused as i am very new the flash and i am not sure where to put what... but i will try it now.
Avatar of Refael

ASKER

hi again , your second comment now confuses me. i am getting script error.
will u be able to show me just one time on one button how it should look? for me this is Chinese!
sure thing... I'll be in the office in a little while..
what does your script error say?

Avatar of Refael

ASKER

Thnaks a lot for you help but i laready solved it with other script as i couldnt wait any longer :-)