Hey Paul, In general, when using cod elike this, it is best to check that loaded == total AND that there is a value.
Because ,ofcourse, (bytes_loaded)0 == (bytes_total)0 can give you an incorrect loaded status. Try something like: if (bytes_loaded == bytes_total && bytes_total > 4) I do not, however, think this is your problem. Just a safeguard in future. Mike Mike Pearce [EMAIL PROTECTED] http://www.nectarine.com.au ----- Original Message ----- From: "Paul Brian" <[EMAIL PROTECTED]> Newsgroups: fugli To: "Flash Developers List" <[EMAIL PROTECTED]> Sent: Friday, June 25, 2004 12:22 PM Subject: [fugli] Re: MAC preloader issue > Thanks for that Chris. > > Didn't seem to work. It's interesting that when you type in the url > http://www.shsl.com.au it didn't work. I got the client to type in > default.htm and it worked! > > Might just throw in a redirection script and send it to a new page > so the problem no longer occurs. > > Paul. > > > "Chris Velevitch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > > 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 > > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.693 / Virus Database: 454 - Release Date: 31/05/2004 > > > > --- > 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/ > --- 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/
