Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: [flasher] Extreme preload! FAST HELP NEEDED!!!
From: Burns, Christopher A.
Date: Wed, 31 Jan 2001 20:05:46 -0000

Hi,

The best way to do what you are trying to do is by using the getBytesLoaded
function in flash5. Here is some example code that would be loaded into a
frame action.

function checkLoad(path){
var lBytes = _root[path].getBytesLoaded();
var tBytes = _root[path].getBytesTotal();
var tFrames = _root[path]._totalframes;
trace("lBytes = " + lBytes);
trace("tBytes = " + tBytes);
trace("tFrames = " + tFrames);
if(lBytes > 0 && tBytes > 0 & tFrames > 1){
var percentageOutput = int((lBytes/tBytes)*100);
_root.loadStatus.loaderBar._xscale =
percentageOutput;
}
if(lBytes >= tBytes && lBytes != 0 && tBytes != 0 & tFrames
> 1){
_root.loadExec = false;
_root.loadStatus._visible = false;
}
}

function checkLocal(){
currentURL = _root._url;
currentURL = currentURL.substr(0,4);
if(currentURL == "file"){
_root.noRandom = true;
} else {
_root.noRandom = false;
}
}

checkLocal();



Christopher A. Burns
New Media Architect
Litton TASC - Virtual Schoolhouse
(937) 426-1040 ext 450
http://www.virtualschoolhouse.tasc.com

-----Original Message-----
From: Ujv�ryattasc [dot] com [ryattasc [dot] com">mailto:Ujv�ryattasc [dot] com]
Sent: Wednesday, January 31, 2001 11:51 AM
To: flasher from chinwag
Subject: [flasher] Extreme preload! FAST HELP NEEDED!!!

This message uses a character set that is not supported by the Internet
Service. To view the original message content, open the attached message.
If the text doesn't display correctly, save the attachment to disk, and then
open it using a viewer that can display the original character set. <<
File: message.txt >>



[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]