# How can i make a button, that first finishes x frames and

**URL:** <https://forum.kirupa.com/t/how-can-i-make-a-button-that-first-finishes-x-frames-and/38130>\
**Category:** Uncategorized\
**Created:** [December 18, 2003, 4:33pm UTC](https://forum.kirupa.com/t/how-can-i-make-a-button-that-first-finishes-x-frames-and/38130 "2003-12-18T16:33:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cursed\_Soul](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Cursed\_Soul](https://forum.kirupa.com/u/Cursed_Soul)\
**Post date:** [December 18, 2003, 4:33pm UTC](https://forum.kirupa.com/t/how-can-i-make-a-button-that-first-finishes-x-frames-and/38130/1 "2003-12-18T16:33:48Z")

</div>

Hiya, flash-N00b & new here,

and i got a question,  
ive looked trough the action scripts, and trough the entire 1200 page Flash handbook, but i couldnt find this one thing, wich i need really bad, im sure its scriptable, but i havent script one thing, besides some poor html.

what i want to know is, how can i make a button, that first finishes XX frames, and then goes to a sertain frame somewhere else on the timeline.

i hope someone can help me out, gotta finish this tomorrow for a schoolproject, and the teach doesnt even know what ‘action scripting is’ lol.

thnx in advance :)=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2003, 11:37am UTC](https://forum.kirupa.com/t/how-can-i-make-a-button-that-first-finishes-x-frames-and/38130/2 "2003-12-21T11:37:02Z")

</div>

Dutch ? Ik spreek Vlaams 😉

Yes, the script will become something like this:

```auto

yourbutton.onRelease = function(){
        play();
        onEnterFrame = function(){
                if(this._currentframe == 306){
                        delete this.onEnterFrame
                        gotoAndPlay(373);
                }
        }
}
yourotherbutton.onRelease = function(){
        play();
        onEnterFrame = function(){
                if(this._currentframe == 370){
                        delete this.onEnterFrame
                        gotoAndPlay(373);
                }
        }
}
anotherbutton.onRelease = function(){
        play();
        onEnterFrame = function(){
                if(this._currentframe == 250){
                        delete this.onEnterFrame
                        gotoAndPlay(373);
                }
        }
}

```

306, 370 en 250 zijn maar voorbeeldgetallen hè. Dan zou da moeten werken. Enfin, als ik u toch goed begrepen heb.
