This content has been marked as final.
Show 7 replies
-
1. Re: preloader problem
kglad Sep 2, 2007 2:47 PM (in response to Larryr3)you have a space between _ and totalframes. -
2. Re: preloader problem
Larryr3 Sep 2, 2007 3:04 PM (in response to Larryr3)I removed the space and I still get error message :
**Error** Scene=Preloader, layer=Layer 1, frame=1:Line 6: ')' expected
var progress = Math.round (100 * (_framesloaded /_ totalframes));
Total ActionScript Errors: 1 Reported Errors: 1 -
3. Re: preloader problem
SymTsb Sep 2, 2007 10:04 PM (in response to Larryr3)Larry, the space is between the _ and t in totalframes. it should read...
var progress = Math.round( 100 * (_framesloaded/_totalframes)); -
4. Re: preloader problem
kglad Sep 2, 2007 10:34 PM (in response to Larryr3)you didn't remove any space. that's exactly the same line as in your first post. -
5. Re: preloader problem
Larryr3 Sep 3, 2007 4:58 AM (in response to Larryr3)I did remove the space and its made things worse. Now I have two errors.
**Error** Scene=Preloader, layer=Layer 1, frame=1:Line 1: Statement block must be terminated by '}'
if(_totalframes > 0) {
**Error** Scene=Preloader, layer=Layer 1, frame=1:Line 10: Syntax error.
Total ActionScript Errors: 2 Reported Errors: 2
Here's the code
if(_totalframes > 0) {
if (_framesloaded == _totalframes) {
// finished loading
gotoAndPlay(1);
} else {
var progress = Math.round (100 * (_framesloaded/_totalframes));
ProgressBar.gotoAndStop(progess);
}
-
6. Re: preloader problem
kglad Sep 3, 2007 7:46 AM (in response to Larryr3)read the error message. this one is easy to understand: you need another right curly bracket ( } ) to close your first if-statement. -
7. Re: preloader problem
kglad Sep 3, 2007 7:48 AM (in response to Larryr3)p.s. if you have any further problems, copy (from your fla) and paste your code (to this forum) using the attach code option.



