ForumsProgramming ForumgotoAndStop(); error AS3

2 3870
alsage
offline
alsage
132 posts
Nomad

So I am working on creating this game... (Not saying what game is about ) but basicly when my object touches the finish line its supposed to go to the next frame...

[/quote]stop();

cursor.addEventListener(Event.ENTER_FRAME, Collision)
function Collision(e:Event):void{


if( Level.hitTestPoint(cursor.x, cursor.y, true))
{

}

Level.y += 10;
Finish.y += 10;
if( Finish.hitTestPoint(cursor.x, cursor.y, true))
{
gotoAndStop(3);
}
}[/quote]

Thanks =D

  • 2 Replies
alsage
offline
alsage
132 posts
Nomad

Either worked... I did a lot of research and found out I had to Remove the event listener because they are global and go to each frame...

stage.removeEventListener(Event.ACTIVATE, StageIntializeFrame);

Showing 1-1 of 2