Heya guys
so,i have this problem,sorry if there was a thread like this,i was googling,and haven’t found a solution that would work in my case,so…
this is what i want to do,when ball (mcCursor) touches walls (mcWall),the game jumps to frame 2,where restart button is located (mc_RrButton),but i keep getting 1009.
Frame 1 code (start button code) :
mc_StartButton.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{
gotoAndPlay(3);
}
stop();
Frame 2 code (restart button code):
mc_RrButton.addEventListener(MouseEvent.CLICK, rrClick);
function rrClick(event:MouseEvent):void
{
gotoAndPlay(3);
}
stop();
frame 3 code (game code):
stop();
function beginCode()
{
{
addEventListener(Event.ENTER_FRAME, collisions);
function collisions(event:Event):void
{
Mouse.hide();
mcCursor.startDrag(true);
if(mcCursor.hitTestObject(mcWall))
{
stopDrag();
gotoAndPlay(2);
}
}
}
}
beginCode();
what i am doing wrong?