Skip navigation
Currently Being Moderated

I don't understand preloaders

Nov 27, 2007 4:58 PM

Can someone explain pre-loaders to me or direct me to a good explanation.

I have tried to use them, but I can't wrap my head around this simple concept.

I don't get how the pre-loader plays before the movie is loaded. I have tried to import my site as a swf into another preloader project and it doesn't have the same functionality.

I also tried using actionscript to get the swf and that works great, but the preloader doesn't play while the swf is loading because it's like a separate thing.

Please help me escape this confusion about this common thing.
 
Replies
  • Currently Being Moderated
    Nov 28, 2007 6:09 AM   in reply to mythster
    Go to http://www.gotoandlearn.com/

    He has 2 free video tutorials on preloaders (basic and advanced) - he explains the code line by line.

    Hope that helps
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2007 10:46 AM   in reply to mythster
    >> I don't get how the pre-loader plays before the movie is loaded. I have
    >> tried
    to import my site as a swf into another preloader project and it doesn't
    have
    the same functionality.

    If you do it the right way, the preloader movie, and your content movie are
    two separate swf's. The preloader is small - containing maybe a bar that
    animates, and some text - as well as an empty movie clip to load your
    content into. You use the MovieClipLoader class to load your content into
    the empty movie clip - as it's loading you get messages from the loader
    class - like onLoadProgress which you can employ to make your bar move, and
    the text change. When you receive the onLoadInit message your content is
    fully downloaded and ready and you can then tell it to play.
    If your content doesn't work as expected when loaded into a an empty MC you
    are likely using _root references - bad idea. As _root is now your
    preloader - not your content. You can fix by doing the right thing and
    removing _root references - or you can do it the easy way and use
    lockroot=true within the content.

    --
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/


     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2007 12:05 PM   in reply to somnlos
    Hi, Somnlos, thanks for the gotoandlearnsite, fabulous! However, I did the basic preloader tutorial and got an error with Flash CS3, in the actionscript. It's in this line:
    if _root.getBytesLoaded() = _root.getBytesTotal() {
    gotoAndPlay(3);}
    else {
    gotoAndPlay(1);}
    I get this error:
    if _root.getBytesLoaded() = _root.getBytesTotal() {
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2007 12:34 PM   in reply to MOUSEHOUSESITE
    Not sure why I can't post more text in previous post, but here's the rest, sorry!
    '(' expected
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2007 4:45 PM   in reply to MOUSEHOUSESITE
    I got this resolved through the gotoandlearn.com forums. I was missing both double equal sign and also enclosing parens on my IF statement, and now it works.

    However, my file loads VERY slowly, at 3.5MB. I have it split into multiple SWF's, which are called to from one main SWF. Anyone have any ideas on how to make it load faster, other than reducing file size, I'm all ears. Thanks!
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 24, 2007 10:37 AM   in reply to MOUSEHOUSESITE
    Try changing hosting. It could quadruplicate the speed is it's FAST.
    Another option could be to reduce traffic, which you don't want, hehe... but seriously, if you see your page downloading slowly when still offline, wait to see how it downloads while 5 people does it at the same time. And of course, if the total is 3.5 MB, your hosting will quit soon hosting you that if you are not paying a expensive server, which you are probably not doing as per the kind of questions you are asking.

    Good luck.
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)