the thing is like this.I have 2 swf files which are loaded in the main swf.How can i make a preloader for them inside the main swf to display how much of the other swf has been loaded?Without adding a second scene…I was thinking about a dynamic text field that should display how much has been loaded for each movie.Unfortunately i don’t know how to da that.I have tried the code like this but it doesn’t work:
per_fractal = Math.Floor(getbytesloaded(fractal.swf)*getbytestotal(fractal.swf)/100);
Myoutput.text = “per_fractal” + " %";
Ok … I haven’t tried this but now that I think about it, this should work:
In the movie you want to display a preloader for on the host swf, make two extra keyframes at the very beginning of the timeline (frame 1&2).
To the first keyframe, add a new mc (CTRL+F8, don’t forget to drag it from the library onto the stage after using CTRL+F8) and apply following code to it (to the mc that is, not the keyframe):
Now for your host movie. I suggest you use a preloader from the tutorial here on kirupa. It’ll make it easier to understand what’s going on. Find it hereWhen you’re done setting it up, replace the code with this:
well,i don’t have time to see if it work right now couse i’m on my way home(after a long night at work) but i’ll try it first time in the morning.Anyway it’s quite easy to make it with keyframes but my problem is that i have made the movie in such a way that if i add keyframes my code will not work…
thanks anyway