random flash motion error
by blackflame1991
on
Jan 21, 2006 at 8:26:10 pm
i did the flash random motion video and every time i test the movie i get Scene=Scene 1, Layer=actions, Frame=1: Line 2: Unexpected '!' encountered
var t = this.attachMovie("ball","ball"+i,i);
Scene=Scene 1, Layer=actions, Frame=1: Line 5: ')' or ',' expected
t.dx = Math.round(Math.random()*450;
Scene=Scene 1, Layer=actions, Frame=1: Line 6: ')' or ',' expected
t.dy = Math.round(Math.random()*400;
Scene=Scene 1, Layer=actions, Frame=1: Line 10: Unexpected ')' encountered
)
error can any one help me
Re: random flash motion error by lajoiet on Jan 21, 2006 at 10:13:59 pm
Frame=1: Line 2: Unexpected '!' encountered
var t = this.attachMovie("ball","ball"+i,i);
I don't see any exclamation points in that line, and I don't remember them being anywhere else in the code. Check the line before or after that and see if something is off.
Scene=Scene 1, Layer=actions, Frame=1: Line 5: ')' or ',' expected
t.dx = Math.round(Math.random()*450;
You forgot the closing parentheses:
t.dx = Math.round(Math.random()*450);
Scene=Scene 1, Layer=actions, Frame=1: Line 6: ')' or ',' expected
t.dy = Math.round(Math.random()*400;
Same thing:
t.dy = Math.round(Math.random()*400);
Scene=Scene 1, Layer=actions, Frame=1: Line 10: Unexpected ')' encountered
)
My only guess on this one is that Line 10 in Lee's tutorial closes the for loop, so line 10 SHOULD be simply "}" (CURLIE BRACES not standard parentheses.)