On Fri, 25 Jun 2004 11:05:42 +1000, Paul Brian <[EMAIL PROTECTED]> wrote:
We have a problem where MAC users can't get past the
loading screen for some reason.  It get's stuck on say 10%
50% etc. and won't go any further.

Here is the code I am using, it's all fairly standard.  Anyone
got any idea what it could be or have faced this issue before?

    bytes_loaded = Math.round(this.getBytesLoaded());
    bytes_total = Math.round(this.getBytesTotal());
    getPercent = bytes_loaded/bytes_total;
    this.loadBar._width = getPercent*218.1;
    this.loadText = Math.round(getPercent*100)+"% loaded.";
    if (bytes_loaded == bytes_total) {
        gotoAndPlay("shsl", 1);
    }

Have you tried this code on other platforms (Windows, Linux)? It maybe that the Mac Player has a problem with rounding integers. Since both getBytesLoaded and getBytesTotal return integers, you'd be better off comparing them directly instead of comparing the rounded values.


     bytes_loaded = this.getBytesLoaded();
     bytes_total = this.getBytesTotal();
     getPercent = bytes_loaded/bytes_total;
     this.loadBar._width = getPercent*218.1;
     this.loadText = Math.round(getPercent*100)+"% loaded.";
     if (bytes_loaded == bytes_total) {
         gotoAndPlay("shsl", 1);
     }


Chris

---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to