Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloader won't play 2

Status
Not open for further replies.

flasher

Technical User
Mar 4, 2002
245
US
Hi, I have a simple flash movie with bg music in it. For some reason, although the preloader works fine in flash, it doesn't play once uploaded. The screen remains blank until the music downloads.
Located at
I guess I would have to email the .fla if someone would be willing to look at it. Thanks a lot.
 
Either post a link to your .fla, or post some code! Regards,

new.gif
 

Ok. Here's the code in the preloader:

if (_framesloaded>=_totalframes) {
gotoAndPlay ("Main Movie", 1);
}

I also tried this code which didn't work either:
ifFrameLoaded ("Main Movie", 140) {
gotoAndPlay ("Main Movie", 1);
}
 
Well, the first one should work! Actually it must since I hear your sound start playing, but what is "Main Movie", a scene name, or a label? And what do you have visually on top of that code that would show up in the preloader? Textfields? Animations? Regards,

new.gif
 
...but what is "Main Movie", a scene name, or a label?...
It's a scene name.

...And what do you have visually on top of that code that would show up in the preloader? Textfields? Animations? ...

I have a simple text animation. (with the word loading)


You said you hear the sound play. I also do but until it downloads, I should see the preloader instead of a blank screen..
 
E-mail me your .fla at oldnewbie@hotmail.com, will have alook at it. Regards,

new.gif
 
Uncheck Export for ActionScript in the Linkage of your sound file in the Library. That's what's keeping your animation from showing up.

Also, although it will still work as is, your preloader should be on 3 frames.

Frame 1:
if (_framesloaded>=_totalframes) {
gotoAndPlay ("Main Movie", 1);
}

This is only to prevent seeing a flash frame on a refresh or subsequent visits to the site. The file being in the user's cache, this action will skip your preloader all together. It must hold only the script. Your animation layer should only cover frames 2 and 3, and not this first frame.

Frame 2:
if (_framesloaded>=_totalframes) {
gotoAndPlay ("Main Movie", 1);
}

Same as 1 but here's where the action is on the initial download.

Frame 3:
gotoAndPLay (2);

Loops to frame 2 until condition on frame 2 is true.

Hope this is clear and merits your vote! Regards,

new.gif
 
I'm giving you a vote even before I try it out so I won't forget!
 
I clicked "No linkage" in the linkage properties of my sound file but I'm still not seeing the animation. I didn't yet try the rest of the instructions you sent but I you said it shouldn't make a difference.
 
You sure you right-clicked your sound file in the library, and unchecked every single box in the linkage window (we are talking MX here aren't we?), because I just checked it again in your original file, and that's the only thing I changed.
Your are testing this through "Show Streaming" aren't you.
Should I send you back your corrected .fla? Regards,

new.gif
 
Oh, that's the problem. I have Flash 5. There are 3 radio options in the linkage box: No linkage, export this symbol, or "import this symbol from url"

In order to uncheck "export this symbol" I had to check "no linkage."

In the sound panel, I have the music set to event. Should I change it to stream?
 
Just opened it up in 5, with the linkage set to "No linkage", didn't change anything else, and it's working fine! Regards,

new.gif
 
While you publish in HTML you change the code in published one to play=1; from default play=0;I hope this works.
Get back to me if it does.
 
A word of warning:
if (_framesloaded>=_totalframes)
will sometimes make the condition true, when you first start the preload totalframes will = 0 as nothing is loaded.
use.
if (_framesloaded>=_totalframes && _totalframes>1) {

why not use getBytesLoaded for a more accurate preloader?
BenG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top