Yeh, I've already got all the preloading code setup -
kBytesLoaded = _parent.getBytesLoaded()/1024;
kBytesTotal = _parent.getBytesTotal()/1024;
kBytesRemaining = kBytesTotal - kBytesLoaded;
percentageLoaded = 100 * kBytesLoaded / kBytesTotal;
percentRemaining = 100 - percentageLoaded;
ProgressText = Math.floor(percentageLoaded) + "%";
ProgressText2 = Math.floor(kBytesLoaded) + " OF " +
Math.floor(kBytesTotal) + " KBYTES LOADED";
loadBar._xScale = percentageLoaded;
Instead of having the normal rectangle loading, I want a line to trace a
rectangle. I already have a series of four shape tweens drawing a
rectangle (these have a 100 frame duration), I would like this movieclip
to correspond with percentageLoaded - the reason why I have a tracing
rectangle is that I'm loading content on inside its area (not in the
movieclip) but inside the area that it traces, so its like a border.
Howard Nager wrote:
Ha - thanks for catching the typo. I should mention that this is just the way
to grab the percent loaded...by no means will you get a smooth animation (the
100 frame loading sequence) out of this.
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Troy Rollins
Sent: Sun 12/11/2005 9:53 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How do I tell a movieclip to play insync
withtheloading percentage.
On Dec 11, 2005, at 9:48 PM, Howard Nager wrote:
var percentage = (_root.getBytesLoaded()/root.getBytesTotal()) * 100;
Right, and that is the other way.
Watch that second "_root" though. (e.g. _root.getBytesTotal())
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders