Does anyone know how to create a preloader for an externally loaded .swf movie?
I used Flix to created a .swf movie from a video. I’m loading it to my main timeline using loadMovie. How would I create a preloader to let the user know the file is loading?
Well, you could make advantage of the fact that when movies are loaded inside other ones, they share the same root. This is just something I’m thinking about, I don’t know if it works.
Use the kirupa.com tutorial to create the preloader in the external movie (here), cut (CTRL+X) everything underneath [COLOR=BLUE]getPercent = bytes_loaded/bytes_total;[/COLOR]
Replace [COLOR=BLUE]bytes_loaded[/COLOR] and [COLOR=BLUE]bytes_total[/COLOR] with [COLOR=BLUE]_root.bytes_loaded[/COLOR] and [COLOR=BLUE]_root.bytes_total[/COLOR] and at [COLOR=BLUE]_root.[/COLOR] before getPercent.
Now apply the same preloader to your main movie, but delete (not cut) everything above getPercent … including getPercent, so that you have this code:
This is exactly what I´ve been struggling with for a couple of days now. Got some advice from lostinbeta in this thread http://www.kirupaforum.com/forums/showthread.php?s=&threadid=26291
but it didn´t work for me ´couse I wanted to load movies into an MC that I´ve already placed in an specific location in my main movie and that example createde an empty MC for the movie and an MC for the preloader and then they pulled info from eachother. I´m not at my workstation som I can´t check out the code you gave Voetsjoeba but I will follow this thread carefully!
The pieces are there, but I dont know how to arrange them.
Does the preloader code go on the main timeline or in the holder MC? And where do you put your loadMovie() method??? I know I shouldnt put it as a callback, but how can I possibly put it before the if/then statement. That bypasses the whole preloader!
I´m still working on it can´t get it to work properly either.
But as far as the preloader code that has to go in your main timeline and the loadMovie() comand have to be in the same frame or before the preloader code as well as where your textboxes and loadBar are located (I guess?).