Flash preloading

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Flash preloading
bgflorida
CZ Newbie
bgflorida has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 30, 2004
0.00 posts per day
Posts: 7
Points: 394
   
Hi guys,

I'm having yet another problem. Whatever I do I can't seem to make a preloader work on my flash intro. If you go to [ Register or login to view links on this board.] you'll see there's a flash intro that takes a while to load. I've looked at a bunch of tutorials and everything but am unable to get a flash preloader to work. If anybody can tell me why or can help me out I would greatly appreciate it. Thanks!



Back to top Reply with quote
#2   re: Flash preloading
redhot_2oo3
PayPal Donation
CZ Moderator
redhot_2oo3 has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Codezwiz Elf
Website:
Status: Offline
Joined: Aug 26, 2003
0.08 posts per day
Posts: 633
Points: 25,047
   
See what you mean, it does take a while.

Preloaders can work in several ways, but the easiest is probably to check to see if a certain frame is loaded before starting to play the main movie. the frame to check needn't be the last one, as a certain amount of loading can continue while the movie is playing.

So if your movie has 500 frames, it may be ok to start playing when, say frame 250 has loaded. To do that, you only need a couple of keyframes of instructions.

Make sure the main movie starts at, for example, frame 10. Between frames 1 to 9, you can put your preloding animation or text.
At frame one, add an action that says;

If Frame Is Loaded (250)
Go to and Play(10)
End Frame Loaded

At frame 9 add the action;

Go to and Play (1)

This will loop the preload animation frames (1-9) until frame 250 has loaded, then it will release the movie to play at the start of the main animation at frame 10.

Hope this helps. icon_razz.gif




_________________
Back to top Reply with quote
#3   re: Flash preloading
bgflorida
CZ Newbie
bgflorida has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 30, 2004
0.00 posts per day
Posts: 7
Points: 394
   
Hi,

I did what you told me to do and it still doesn't seem to work. For frame 1 I put:

ifFrameLoaded (178) {
}
gotoAndPlay(10);

And for frame 9 I put:

gotoAndPlay(1);

I applied this to all of the layers. If there are any other suggestions please let me know. Thanks!



Back to top Reply with quote
#4   
redhot_2oo3
PayPal Donation
CZ Moderator
redhot_2oo3 has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Codezwiz Elf
Website:
Status: Offline
Joined: Aug 26, 2003
0.08 posts per day
Posts: 633
Points: 25,047
   
You only need apply it to one layer. What version of Flash are you using?




_________________
Back to top Reply with quote
#5   re: Flash preloading
bgflorida
CZ Newbie
bgflorida has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 30, 2004
0.00 posts per day
Posts: 7
Points: 394
   
Flash MX 2004



Back to top Reply with quote
#6   re: Flash preloading
redhot_2oo3
PayPal Donation
CZ Moderator
redhot_2oo3 has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Codezwiz Elf
Website:
Status: Offline
Joined: Aug 26, 2003
0.08 posts per day
Posts: 633
Points: 25,047
   
Try this for frame 1...

ifFrameLoaded (250) {
gotoAndPlay (10);
}

for frame 9...

gotoAndPlay(1);

You would put your pre-loader animation between frames 1-9

Another way of doing it is to determine the total number of bytes and then start the animation once a certain number of bytes have been loaded.




_________________
Back to top Reply with quote
#7   re: Flash preloading
bgflorida
CZ Newbie
bgflorida has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 30, 2004
0.00 posts per day
Posts: 7
Points: 394
   
Hi,

Thanks, that worked out perfectly! But now I want to add a movie clip during the preload. This is the error it gives me:

Statement must appear within on/onClipEvent handler
ifFrameLoaded (250) {

Thanks for your help!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum