A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Load bar problem

  1. #1
    Member
    Join Date
    Oct 2005
    Location
    Sherwood O.R.
    Posts
    90

    Load bar problem

    Here is the code I'm using.

    bytes_loaded = Math.round(this.getBytesLoaded());
    bytes_total = Math.round(this.getBytesTotal());
    getPercent = bytes_loaded/bytes_total;
    this.loadBar._height = getPercent*100;
    this.loadText = Math.round(getPercent*100)+"%";
    if (bytes_loaded == bytes_total) {
    this.gotoAndPlay(3);

    The problem is that the progress bar will make it about 1/4 of the way up before the movie is all the way loaded. The percentage text is acurate though.

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    thats because of the 4th line. this.loadBar._height. the highest its going to get is 100. you want to use the property _yscale.. this.loadBar._yscale = getPercent*100;

  3. #3
    Member
    Join Date
    Oct 2005
    Location
    Sherwood O.R.
    Posts
    90
    Thank you. Thats a big help.

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