shuga
September 13, 2002, 3:14pm
1
k … its a new day at work and i still can’t figure this **** thing out. guess this is why i’m not a good coder … i have no patience for syntax.
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndStop(2);
} else {
_root.stop;
}
percentLoaded=Math.round(((_root.getBytesLoaded())/(_root.getBytesTotal())) * 100);
loadedFile = "File is" + percentLoaded + "% loaded";
here is the errors it’s returning
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement block must be terminated by ‘}’
onClipEvent (enterFrame) {
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 8: Syntax error.
loadedFile = “File is” + percentLoaded + “% loaded”;
system
September 13, 2002, 3:36pm
2
add this: [COLOR=darkred]} [/COLOR]
at the end of the code
this may remove both of the errors but I’m not sure…
system
September 13, 2002, 3:38pm
3
omfgosh
so weird
i was like why do i need a } at the end and why would that take away both errors … but it worked
thanks so much
i really appreciate it
system
September 13, 2002, 8:22pm
4
{Hey shuga pie,
actionscript coding basics:
1.each command ends with a “;”
2.each ( you open needs a ) to close and
3.same for each { you need an }
4.and there’s no “;” after the closing } of an if or else check…
READ the error messages, the solution is in there!
“Statement block must be terminated by ‘}’”
done, so }
system
September 14, 2002, 10:33am
5
well it depends if you do
onEnterFrame = function(){
//do stuff
};
Thats suposed to be the corect syntax for things like that…but it will work either way hehe