Skip to main content
Participant
November 26, 2008
Question

Pre-loader help please!

  • November 26, 2008
  • 1 reply
  • 383 views
Hello! I have an old flash movie, which pre-loader was set for flash player5 and working well. I am updating the site in cs3, but started receiving the following error message when testing it:

- Scene=pre-loader,layer=ACTIONS,frame=2,line12 Syntax error. txtBytes = varKbytes add "Kbytes of" add varTotalBytes add "Kbytes";
- Scene=pre-loader,layer=ACTIONS,frame=2,line14 Syntax error txtBytes = varBytes add " Bytes of" add varTotalBytes add "Kbytes";
- Scene=pre-loader,layer=ACTIONS,frame=2,line19 Syntax error txtPercentage = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) add "%";
- Scene=pre-loader,layer=ACTIONS,frame=2,line29 Syntax error txtElapsed = varElapsedTime add "Seconds";
- Scene=pre-loader,layer=ACTIONS,frame=2,line31 Syntax error txtElapsed = varElapsedTime add "Second";
- Scene=pre-loader,layer=ACTIONS,frame=2,line37 Syntax error txtSpeed = varSpeed add " Kbytes/Second";
- Scene=pre-loader,layer=ACTIONS,frame=2,line44 Syntax error txtRemaining = varRemaining add "Seconds";
- Scene=pre-loader,layer=ACTIONS,frame=2,line12 Syntax error txtRemaining = varRemaining add "Second";

This is the action from frame2:

// ==============================
// Assigning General Variables
// ==============================
objNewTime = new Date();
// ==============================
// Bytes Loaded
// ==============================
varBytes = _root.getBytesLoaded();
varKbytes = Math.round((_root.getBytesLoaded()/1024)*100)/100;
varTotalBytes = Math.round((_root.getBytesTotal()/1024)*100)/100;
if (varBytes>1024) {
txtBytes = varKbytes add "Kbytes of" add varTotalBytes add "Kbytes";
} else {
txtBytes = varBytes add " Bytes of" add varTotalBytes add "Kbytes";
}
// ==============================
// Percentage Loaded
// ==============================
txtPercentage = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) add "%";
// ==============================
// Elapsed Time
// ==============================
varElapsedSeconds = objNewTime.getSeconds()-varStartSeconds;
varElapsedMinutes = objNewTime.getMinutes()-varStartMinutes;
varElapsedHours = objNewTime.getHours()-varStartHours;
varElapsedDays = objNewTime.getDay()-varStartDays;
varElapsedTime = (varElapsedDays*24*60*60)+(varElapsedHours*60*60)+(varElapsedMinutes*60)+varElapsedSeconds;
if (varElapsedTime>1) {
txtElapsed = varElapsedTime add "Seconds";
} else {
txtElapsed = varElapsedTime add "Second";
}
// ==============================
// Speed
// ==============================
varSpeed = (Math.round((_root.getBytesLoaded()/varElapsedTime/1024)*10))/10;
txtSpeed = varSpeed add " Kbytes/Second";
// ==============================
// Est. Time Remainingriables

// ==============================
varRemaining = Math.round((_root.getBytesTotal()-_root.getBytesLoaded())/(varSpeed*1024));
if (varRemaining>1) {
txtRemaining = varRemaining add "Seconds";
} else {
txtRemaining = varRemaining add "Second";
}
// ==============================
// Loading Bar
// ==============================
varMove = Math.Round((_root.getBytesLoaded()/_root.getBytesTotal())*135);
setProperty("_root.mcLoad", _y, 400-varMove);

I am not a flash expert at all and I am desperate for help at this point!

I really appreciate any help.

Thanks!
This topic has been closed for replies.

1 reply

Inspiring
November 26, 2008
Key Word "ADD" is removed so use "+" symbol

Participant
December 2, 2008
Thank you!