Hi,
I am a total newbie at actionscript but have managed to get by with what little I know so far. I was able to use the percentage preloader with a tween_MC (as in the Kirupa tutorial) for my regular Flash movies, and it works awesome! However, I am now trying to put together a Loadmovie combo with 3 external SWF’s… the preloader loads with the appropriate clips, but it stops where the percentage loader bar and text should come in… the rest of the movie loads while the preloader stays static, then disappears once the movie is loaded. I would like to keep the code the same for the preloader so I can reuse it for other movies and I’m assuming I need to place script in the main movie action frame where my emptyMC’s are located. I’m not sure how to place the script/variables in the main movie and would greatly appreciate any help anybody could give me. By the way, I am struggling with actionscript so please try to keep that in mind! I want to preloader to load at movie start, no buttons are invovled here… I can figure it out with buttons…
If I place the preloader in the same swf with my other initial loading movies and use it as an external swf I get the same problem, but scene 2 will not load at all… and there still is no percentage displayed. Is there a way I can use the preloader in an external swf and still have it display somehow? Please help.
This is all I have in my main movie… pretty sure it’s wrong:
**_root.preload.loadMovie(“first.swf”);
_root.preload.loadMovie(“second.swf”);
createEmptyMovieClip(“first_holder”, 1);
first_holder.loadMovie(“first.swf”);
createEmptyMovieClip(“second_holder”, 2);
second_holder.loadMovie(“second.swf”);**
This is in the middle of the preloader where the Tween_MC comes in:
loaded_bytes = Math.round(_root.getBytesLoaded());
loaded_total = Math.round(_root.getBytesTotal());
total_percent = (loaded_bytes/loaded_total)100;
_root.loaded_text = Math.round(total_percent);
startpoint = bar._x
_root.text._x = startpoint + (_root.bar._currentframe2.5);
I have a feeling that this is throwing me off:
*onClipEvent (enterFrame) {
gotoAndStop(int(_parent.getBytesLoaded()100/_parent.getBytesTotal()));
}
This is located on an instance of tween_mc named “bar,” where the preloader bar grows… I’m just not sure how to reference the file properly.
I’m pretty confident that I am totally lost… I just can’t figure it out. I have tried to follow every tutorial out there but can’t find what I need. Soooo sorry about the long post.
I feel dumb… KIRUPA rocks:crazy: