Report
Save
Cancel
offline
alsage
132 posts
Nomad
Posted July 7, '10 12:27am UTC
It says this:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at MouseGame_fla::MainTimeline/CursorColideWithMap() I know whats causing the problem but I need that line of code for the game to work..
Code:
stage.addEventListener(Event.ENTER_FRAME, CursorColideWithMap ); function CursorColideWithMap(event:Event):void{ if(FinishLine.hitTestPoint(cursor.x, cursor.y, true)){ stage.removeEventListener(Event.ENTER_FRAME, CursorColideWithMap ); gotoAndStop(3); } if(Level1.hitTestPoint(cursor.x, cursor.y, true)){ stage.removeEventListener(Event.ENTER_FRAME, CursorColideWithMap ); gotoAndStop(2); } } The Code that is causing it is this: if(FinishLine.hitTestPoint(cursor.x, cursor.y, true)){ stage.removeEventListener(Event.ENTER_FRAME, CursorColideWithMap ); gotoAndStop(3); } It works fine when I take it out...Altho Even when it is still in it does excactly what its supposed to do it just throws an output error for no reason.
Please help
Thanks
~Sage