# To Press A Button Twice?

**URL:** <https://forum.kirupa.com/t/to-press-a-button-twice/65759>\
**Category:** Uncategorized\
**Created:** [September 29, 2004, 11:57am UTC](https://forum.kirupa.com/t/to-press-a-button-twice/65759 "2004-09-29T11:57:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![roll4life](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@roll4life](https://forum.kirupa.com/u/roll4life)\
**Post date:** [September 29, 2004, 11:57am UTC](https://forum.kirupa.com/t/to-press-a-button-twice/65759/1 "2004-09-29T11:57:44Z")

</div>

hey,

I’ve a button that unloads a movieclip when I press it, ok that’s no problem so far…

but how can I load the movieclip in my instance again[color=#004080] [color=black]by pressing the same[/color][/color]  
[color=#004080][color=#000000]button twice ???[/color]  
[/color]

thanx, already

---

<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:** [September 29, 2004, 12:42pm UTC](https://forum.kirupa.com/t/to-press-a-button-twice/65759/2 "2004-09-29T12:42:49Z")

</div>

> [@roll4life](#):
>
> hey,
> 
> I’ve a button that unloads a movieclip when I press it, ok that’s no problem so far…
> 
> but how can I load the movieclip in my instance again[color=#004080] [color=black]by pressing the same[/color][/color]  
> [color=#004080][color=#000000]button twice ???[/color]  
> [/color]
> 
> thanx, already

Hi,

I am giving one simple example that will solve ur problem:

Create a button on the stage and name it as: myButton  
And write this script on the first frame:

c=1;  
myButton.onRelease = function(){  
foundFunc(c);  
}

function foundFunc(x){  
if(c%2){  
trace(“Load”);  
}else{  
trace(“UnLoad”);  
}  
c++;  
}

I think u got it :love:

* * *

aShIsH

---

<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:** [September 29, 2004, 12:53pm UTC](https://forum.kirupa.com/t/to-press-a-button-twice/65759/3 "2004-09-29T12:53:21Z")

</div>

thank you !!! I’ll try it immediately, hope it fixes my problem…

---

<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:** [September 29, 2004, 1:16pm UTC](https://forum.kirupa.com/t/to-press-a-button-twice/65759/4 "2004-09-29T13:16:27Z")

</div>

man…you’re a genius !!! It works perfectly…  
BIG thanx, again !!!
