[RESOLVED] How do I change this code from AS2 to AS3?
Hi there, I'm using a tutorial to create a game, however it uses AS2 and I am using AS3. As a result the coding below brings up errors 1086 and 1084 (Syntax error: expecting semicolon before leftbrace and Syntax error: expecting rightbrace before leftbrace respectively) in Line 4. Can anyone help me convert this code to AS3 please?
Here's the code:
Actionscript Code:
var walkSpeed:Number = 16;
mcMain.addEventListener
{
onClipEvent(load){
walkSpeed = 16;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y-= walkSpeed
}
}
}