Actionscript Preloader issues.

  • RockmanTV
  • Proficient
  • Proficient
  • RockmanTV
  • Posts: 348

Post 3+ Months Ago

I've gone over this code a million times, yet I cannot find out whats wrong with it. I'm trying to install a basic preloader..

Code: [ Select ]
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();

if (loadedbytes == totalbytes) {
    gotoAndPlay (4);
}
  1. loadedbytes=getBytesLoaded();
  2. totalbytes=getBytesTotal();
  3. if (loadedbytes == totalbytes) {
  4.     gotoAndPlay (4);
  5. }


When I open up the movie online it goes to the 4th frame and waits till the movie loads and then plays. It's very weird. Am I missing something here?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • R.L.D.
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: Astoria,Queens

Post 3+ Months Ago

try this ...

http://www.actionscripts.org/tutorials/ ... ndex.shtml
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

yeah, yer missing a couple of things actually.

that script you wrote should be on, say, frame 2.

on frame 3, put:
Code: [ Select ]
gotoAndPlay(1);


this way, if loadedbytes is not = to totalbytes, it goes back and checks again before moving on to frame 4. got it?

make sure, in your publish settings, you've got it set to actionscript 2.0 and set the export frame to 4 (that way, it doesn't have to load everything to start play frames 1-3)...

hope that helps.

peace and blessings.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 10 guests
  • 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 post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.