# Help...1009

**URL:** <https://forum.kirupa.com/t/help-1009/320541>\
**Category:** flash\
**Created:** [March 26, 2011, 11:24am UTC](https://forum.kirupa.com/t/help-1009/320541 "2011-03-26T11:24:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ProfeaX](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@ProfeaX](https://forum.kirupa.com/u/ProfeaX)\
**Post date:** [March 26, 2011, 11:24am UTC](https://forum.kirupa.com/t/help-1009/320541/1 "2011-03-26T11:24:09Z")

</div>

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?
