dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Different PreLoader methods?

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    21

    Question Different PreLoader methods?

    Hi Guys,

    Just wondering, when i google for ways to do a preloader, there are now so many methods compared to AS2 that i'm a bit lost as to which way to go...

    is there one way of doing that is a decent industry standard that is subtly better than the rest, or does it not really matter?

    Cheers, love this forum by the way, what a resource!

  2. #2
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,131
    The easiest way is to just make an .swf that will load your central .swf ...in the first one, just make a URLRequest and a Loader that loads that request, for the .swf you want to run. At that point, the loader.contentLoaderInfo should be given two event listeners: One for the Event.INIT which is dispatched the central .swf is loaded (at which point it should be added to the stage), and another with ProgressEvent.PROGRESS which will dispatch repeatedly through the load. That progress event arrives at its destination function with .bytesLoaded and .bytesTotal as attributes. From that point, you can draw whatever you want as a load bar, since (.bytesLoaded/.bytesTotal)*100 = %loaded

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center