Error #1009: Cannot access a property or method of a null object reference.
I need a little help. I'm making a game, and everything works fine except for the fact that I have 2 errors, one that doesn't bother me as I can still use the button, but the other one won't let me use the button.
Error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Untitled_2_fla::MainTimeline/frame2()[Untitled_2_fla.MainTimeline::frame2:207]
at flash.display::MovieClip/gotoAndStop()
at Untitled_2_fla::MainTimeline/PlayBtn()[Untitled_2_fla.MainTimeline::frame1:13]
//Magyx Placement
RedAtk.addEventListener(MouseEvent.CLICK, RedAttack);
function RedAttack(Event:MouseEvent):void
{
gotoAndStop(19)
}
That's where Frane2:207 is, I don't see anything wrong with it, considering all my other ones are the same
nextBlueAtk.addEventListener(MouseEvent.CLICK, NWA);
function NWA(Event:MouseEvent):void
{
gotoAndStop(23)
}
nextGreyAtk.addEventListener(MouseEvent.CLICK, NGA);
function NGA(Event:MouseEvent):void
{
gotoAndStop(27)
}
nextGreenAtk.addEventListener(MouseEvent.CLICK, NGRA);
function NGRA(Event:MouseEvent):void
{
gotoAndStop(31)
}
I get no errors for those ones.
And frame1:13?
function PlayBtn(event:MouseEvent):void
{
gotoAndStop(2)
}
Someone please help, I want to continue working on this game!
