A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to check if the level is loaded

  1. #1
    Member
    Join Date
    Sep 2000
    Posts
    44
    HI,
    I want to make a preloader for movies loaded in levels. For that i need to know how to detect if the level is loaded.

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    139
    Rather than checking whether "a level is loaded" you just check the bytes loaded and total bytes of that level, allowing you to calculate a percentage...

    if you're checking the movie on level one, you can use the following to calculate the percentage loaded, for example:

    Code:
    loaded = _level1.getBytesLoaded();
    total = _level1.getBytesTotal();
    percentage = 100 * loaded / total;
    Obviously this needs a bit more work to implement as a proper preloader - but perhaps you're happy with the basic preloader creation. If you need more info, get back to me.

  3. #3
    Member
    Join Date
    Sep 2000
    Posts
    44
    Thanks.
    I'm happy with it.
    Yuppa

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