# Click X times to go to next frame

**URL:** <https://forum.kirupa.com/t/click-x-times-to-go-to-next-frame/284024>\
**Category:** Uncategorized\
**Created:** [March 13, 2009, 9:07pm UTC](https://forum.kirupa.com/t/click-x-times-to-go-to-next-frame/284024 "2009-03-13T21:07:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhintw](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jhintw](https://forum.kirupa.com/u/jhintw)\
**Post date:** [March 13, 2009, 9:07pm UTC](https://forum.kirupa.com/t/click-x-times-to-go-to-next-frame/284024/1 "2009-03-13T21:07:38Z")

</div>

I’m a newbie to action script, and first time posting here.  
Hope I can get some help over here, my question could be very simple to some pros here.

My idea is after the user click maybe 4 or 5 times, the iconContainer will fade away and loads into the code on frame 2.

School only teaches me this. But after one clicks it goes to Frame 2 right away, so my question is

How do i do to set gotoAndStop after 5 clicks?  
And how do I make the iconContainer slowly fades away instead just vanished?

Thanks in advanced. Any help will be appreciated.

Here’s my code on the clickHandler:

> function clickHandler( e:MouseEvent) {

//target refers to the ball/thumbnail clip  
var target = e.currentTarget;

TweenFilterLite.to( target, .5, { scaleX:0.1, scaleY:0.1, glowFilter: {color:0x000000, alpha:.5, blurX:5, blurY:5, quality:3}, ease:Quad.easeOut } )

iconContainer.visible = false;  
gotoAndStop(2);  
}
