# Help me..how to go to the next page

**URL:** <https://forum.kirupa.com/t/help-me-how-to-go-to-the-next-page/328481>\
**Category:** Uncategorized\
**Created:** [May 20, 2012, 3:34pm UTC](https://forum.kirupa.com/t/help-me-how-to-go-to-the-next-page/328481 "2012-05-20T15:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lemonshizuka](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@lemonshizuka](https://forum.kirupa.com/u/lemonshizuka)\
**Post date:** [May 20, 2012, 3:34pm UTC](https://forum.kirupa.com/t/help-me-how-to-go-to-the-next-page/328481/1 "2012-05-20T15:34:44Z")

</div>

hi all, i need a help. well i’m new here.  
i have this this code to make a random catch game. so the problem is i cant go to the next frame. please someone help me.  
here is my code:

> 

stop();

var holder:Sprite = new Sprite();  
addChild(holder);

for (var i:int; i\<10; i++) {  
var arrayAphid:Array = new Array();  
holder.y = 500;

```
arrayAphid*= new aphids();
holder.addChild(arrayAphid*);
//**
arrayAphid*.buttonMode = true;
arrayAphid*.addEventListener(MouseEvent.CLICK, objectFound);
//**
arrayAphid*.x = Math.random()*stage.stageWidth;
arrayAphid*.y = Math.random()*stage.stageHeight;
//arrayAphid*.scaleX = arrayAphid*.scaleY = Math.random();

arrayAphid*.gotoAndPlay(Math.ceil(Math.random()*15));

```

}

//\*\*  
function objectFound(e:MouseEvent):void  
{  
var \_found:int = arrayAphid\*;  
var aphids:MovieClip = e.currentTarget as MovieClip;  
aphids.removeEventListener(MouseEvent.CLICK, objectFound);

```
// Set the object's visibility to false
aphids.visible = false;

_found--;

//trace('&gt; ' + aphids.name + ': founded');
//trace('&gt; objects founded: ' + _found);

if (_found == 0)
{
    trace('&gt; all founded');
    nextFrame();
}

```

}
