|
|
 |
Flash Problem
date posted 4th September 2002 18:15
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C2543E.7A7AD110
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hi, could some one please tell me what is wrong with this action script
coz when it is run it keeps looping and not loading any of the next
scene, so if there is music in the next scene it will start the music
and then keep doing it until the movie crashes. The code is below
//find out how much has loaded
count=int(_root.getBytesLoaded()/1024)+"KB";
total=int(_root.getBytesTotal()/1024)+"KB";
percentage=int((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";
status="Loading...";
//set the x scale of the loadbar
loadbar_size=int((_root.getBytesLoaded()/_root.getBytesTotal())*100);
setProperty("loadbar",_xscale,loadbar_size);
//check if all data is loaded
if(_root.getBytesLoaded()!=_root.getBytesTotal()){
gotoAndPlay("loading");
}else{
percentage="100%";
status="Loaded!";
setProperty("loadbar",xscale,"100");
gotoAndPlay("Scene2");
}
------=_NextPart_000_0001_01C2543E.7A7AD110
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Hi, could some one please tell me what is wrong with =
this
action script coz when it is run it keeps looping and not loading any of =
the
next scene, so if there is music in the next scene it will start the =
music and
then keep doing it until the movie crashes. The code is =
below
//find out how much has =
loaded
count=3Dint(_root.getBytesLoaded()/1024)+"KB";
total=3Dint(_root.getBytesTotal()/1024)+"KB";
percentage=3Dint((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";
status=3D"Loading...";
//set the x scale of the loadbar
loadbar_size=3Dint((_root.getBytesLoaded()/_root.getBytesTotal())*100);
setProperty("loadbar",_xscale,loadbar_size);
//check if all data is =
loaded
if(_root.getBytesLoaded()!=3D_root.getBytesTotal()){=
 =
; gotoAndPlay("loading");
}else{
 =
; percentage=3D"100%";
 =
; status=3D"Loaded!";
 =
; setProperty("loadbar",xscale,"100");
 =
; gotoAndPlay("Scene2");
}
------=_NextPart_000_0001_01C2543E.7A7AD110--
|
 |
|