shuga
September 12, 2002, 9:44pm
1
i got this error
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 6: ';' expected
percentLoaded=Math.round((_root.getBytesLoaded)))
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 7: ';' expected
/(_root.getBytesTotal()) * 100)
when i put this code in
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"
}
help would be greatly appreciated
system
September 12, 2002, 9:51pm
2
Well, as the error msg tries to tell you , just add the " ; " at the end of your actions in the else statement: after stop();
after *100);
after loaded";
and it should be ok
system
September 12, 2002, 9:53pm
3
code looks like this now … with the ; added at the ends of lines 5,6 and 7
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"
}
still returns the same error
system
September 12, 2002, 10:09pm
4
not:
} else {
_root.stop();
percentLoaded=Math.round((_root.getBytesLoaded)));
/(_root.getBytesTotal()) * 100);
loadedFile = "File is" + percentLoaded + "% loaded"
}
but:
} else {
_root.stop();
percentLoaded=Math.round((_root.getBytesLoaded()) //not here
/(_root.getBytesTotal()) * 100);
loadedFile = "File is" + percentLoaded + "% loaded"; //add here
}
coz the percentLoaded stuff goes over 2 lines, it’s loaded divided by total , result x 100, then ; for end of command
system
September 12, 2002, 10:11pm
5
makes sense
did what you said
returns exactly the same error.:-\
sorry for the double post … i posted it here … and then thought the AC forum would be a better place
system
September 12, 2002, 10:21pm
6
check beeners reply over there too, no line break, all on one line, and also recheck your pairs of opening ( versus closing) , i think there’s one too many & one missing, that should do it.