What's wrong with this code?
I used this code on one project and it's working just fine. Then I'm using it on another project (very slightly modified) and it's giving me syntax errors:
Quote:
stop();
import flash.events.KeyboardEvent;
import flash.display.MovieClip;
stage.addEventListener(KeyboardEvent.KEY_UP, MoveOn);
function MoveOn(event:KeyboardEvent):void
{
gotoAndPlay("horse"); //also tried NextFrame(); here, but didn't work either
}
//also tried it with and without code MoveOn(); at the end