In my program I have a small arrow spinning around, this is the code im using
import flash.events.Event;
var spinSpeed:Number = 2;
function onEnterFrame(event:Event):void{
myMovieClip.rotation += spinSpeed;
}
addEventListener(Event.ENTER_FRAME, onEnterFrame);
btnnext14.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11);
function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void
{
gotoAndStop(39);
}
It works fine and the arrow spins, but when I try and go to the next slide, I get an error #1009
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at pp2_fla::MainTimeline/onEnterFrame()[pp2_fla.MainTimeline::frame38:9]
Anyone know whats wrong?