A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: cant find the bug :

  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    53
    I created a preloader with a percentage display. The dynamic text "loadingdisplay" displays the percentage loaded.

    I cant find a little bug in this code though. I was tracing the loadingdisplay-variable to find out why it is always showing 67% - from 0 bytes loaded to all loaded.

    Can anyone check the code for me plz?
    _____________________________________

    if (_framesloaded>=_totalframes) {
    gotoAndPlay("Scene 1", 1);
    } else {
    loadingdisplay = "";
    loadingdisplay = Math.round(_framesloaded*100/_totalframes)+"%";
    trace(loadingdisplay);
    gotoAndPlay(_currentframe-1);
    }

    _____________________________________


  2. #2
    Member
    Join Date
    Mar 2002
    Posts
    53

    Smile oh - its not working because I'm a stupid f*** ...

    I used "_framesloaded" and "_totalframes" to display the percentage instead of "_level0.getBytesLoaded()" and "_level0.getBytesTotal()"

    sorry for any inconvenience


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