Groups | Blog | Home
all groups > flash (macromedia) > november 2005 >

flash (macromedia) : need to serperate preloader from main movie...HELP!


spnitch
11/28/2005 10:22:20 PM
I made a mistake with my site...

I made the preloader a part of the main movie, and now, because I have audio
loading dynamically to the first frame, my preloader doesn't play until all the
audio is loaded (at about 72% done) and until then you can only see a blank
white box on the screen, leaving most users to think that nothing's happening.

See for yourself on the test site (www.members.aol.com/spnitch/tessa2.html)

I use MX, but not the latest version (I think mine's from 2002). I really need
to get this done by end of day thursday, so quick help would be MUCH
appreciated.

Thanks in advance.
Ciao
Sean
_EnergiE_
11/28/2005 11:43:42 PM
OK, you can try this: remove the preloader, export the movie as
mainOrWhatEverBlablabla.swf and then : make another movie containing the
preloader and an empty movie. Set the preloader to show the progress for the
empty movie(I suppose you know how to do that). In the empty movie write
loadMovieNum("mainOrWhatEverBlablabla.swf",0).
spnitch
11/30/2005 6:24:14 PM
Thanks for the advice. I did what you said and it seems to start to work, but
then relapses to its old problems. Witness this phenomenon for yourself at it's
new test site:

http://www.members.aol.com/spnitch/tessa.html

As you can see it appears that the first frame of the preloader shows up, but
then quickly switches to a blank screen (not white anymore, but the color of
the background--blue). The preloader then only reappears again around the same
time that it was appearing before--around 72% loaded--leading me to believe
that the loading of the audio files is still holding up the visibility of the
preloader somehow, even though the audio files now exist in a seperate .swf. Do
you have any idea why this could be happening? Could it be something to do with
"_root" scripts in the movie being loaded by the "loadMovie" command?

Again quick help would be amazing, as I only have another day and a half on
this. Thanks much.
_EnergiE_
12/1/2005 1:24:29 AM
Yeah, there was a lot of waiting for the preloader
So lets keep things simple. Here's what you should have: a one-frame movie
with another movie in it called placeholder_mc or as you like it, a Static
text filed stating something like "Loading" and a dynamic one(make sure it uses
a device font or import only the % sign and 0-9 numerals. The preloader: (write
it on a different layer)
onEnterFrame=function(){
var bl:Number=_root.placeholder_mc.getBytesLoaded;
var bt:Number=_root.placeholder_mc.getBytesTotal;
var percent:Number=(bt/bl)*100;
theDynamicTextFiled.text=percent;
if (percent==100){
this.removeMovieClip();
}
}
loadMovie(mainMovie.swf, placeholder_mc);
This should work
spnitch
12/1/2005 6:56:15 PM
OK, I simplified everything as you suggested, and have created yet another test
site at:

www.members.aol.com/spnitch/tessa3.html

I was happy to find that the preloader stayed visible until the main movie was
loaded, however, there are still some problems:

The dynamic text field does not display the percentage complete--it does not
display anything;

Neither of the text fields disappear when the main movie appears on screen;
and worst of all,

When the main movie is finally loaded, the audio player to the left of the
screen does not work properly--it does not play any music even though I am
using the exact same main movie file as I did in the last test site
(www.members.aol.com/spnitch/tessa.html), where the music plays fine--albeit
low-quality (I know how to fix that).

Please advise.

Was I supposed to alter or add to the code you wrote?--because I just copied
and pasted it into my actions layer, changing only the target of the
"loadMovie" command to match my main movie file. Sorry if I'm a bit slow on the
uptake here. Thanks for the help


_EnergiE_
12/2/2005 12:15:23 PM
Changem and the dynamic text field name, how could it show how much's loaded if the scripr doesn't call it ?
TheDynamicTextField.text=percent;
spnitch
12/2/2005 4:41:35 PM
ok, i worked your script around so that now the percentage is displayed and all
of that is fine, but the bigger problem still persists:

the music player doesn't play music!

The new test site where you can experience this is
www.members.aol.com/spnitch/tessa4.html

I would also like the content of the main movie to wait until fully-loaded to
appear. Currently the main movie becomes visible at about 76% loaded
(presumably after the large audio files have loaded). This leads me to believe
that the audio files are loading, but are just not properly called to play
through the music player. Do you have any idea why this would be happening?

If you check www.members.aol.com/spnitch/tessa.html you'll see that music
plays through the player just fine...the preloader in this movie takes up 2
frames, the main movie being the only thing on the 3rd frame, however this is
the movie where the preloader doesn't show up at all until 76% loaded. Very
frustrating.

Your help continues to be very appreciated. Thanks for everything. Please
don't give up on me now.
spnitch
12/2/2005 4:44:53 PM
AddThis Social Bookmark Button