-
Please help! 1086 syntax error (New)
Hi, I am trying to follow the "move sprites with keyboards" tutorial. the code I was given is:
onClipEvent(enterFrame) {
if(Key.isDown(Key.UP)) this._y-=3
if(Key.isDown(Key.DOWN)) this._y+=3
if(Key.isDown(Key.LEFT)) this._x-=3
if(Key.isDown(Key.RIGHT)) this._x+=3 }
when i put this in i get:
Scen 1, layer 'red car', Frame1, Line 1 1086: Syntax error: expecting semicolon before rightparen.
If i try doing this I get a whole bunch of new errors. If anybody could help I would greatly appreciate it. I am usin Flash CS5 if that changes anything.
-
Senior Member
try this:
onClipEvent(enterFrame) {
if(Key.isDown(Key.UP)){ this._y-=3;}
if(Key.isDown(Key.DOWN)){ this._y+=3;}
if(Key.isDown(Key.LEFT)){ this._x-=3;}
if(Key.isDown(Key.RIGHT)){ this._x+=3;}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|