# 4 buttons -----\> one function!

**URL:** <https://forum.kirupa.com/t/4-buttons-one-function/97909>\
**Category:** Uncategorized\
**Created:** [December 31, 2003, 2:49am UTC](https://forum.kirupa.com/t/4-buttons-one-function/97909 "2003-12-31T02:49:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashSwimmer](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@FlashSwimmer](https://forum.kirupa.com/u/FlashSwimmer)\
**Post date:** [December 31, 2003, 2:49am UTC](https://forum.kirupa.com/t/4-buttons-one-function/97909/1 "2003-12-31T02:49:15Z")

</div>

hi guys,  
i’ve 4 buttons in the main root… :}  
and if any of them clicked tell mc\_main to gotoAndPlay(“mainon”).  
mc\_main is a movie clip contains from 20 frames if any buttons clicked it’s appear. :sure: and if i click on it .  
… it disappear.  
it’s ok for one button but if i clicked 2 or 3 buttons before click  
on it.  
so i create this function  
[AS]onClipEvent (load) {  
function homeClick() {  
if (mc\_main.\_currentframe == 10) {  
// i don’t know what i’ve to write here  
} else {  
\_root.mc\_main.gotoAndPlay(“mainon”);  
}  
}  
}[/AS]  
it works greate but if the \_currentframe ==10 what supose to happen:h:
