# Button with three actions on fails one of them

**URL:** https://forum.kirupa.com/t/button-with-three-actions-on-fails-one-of-them/7999
**Category:** Uncategorized
**Created:** [November 12, 2002, 2:30am UTC](https://forum.kirupa.com/t/button-with-three-actions-on-fails-one-of-them/7999 "2002-11-12T02:30:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![multimediamkt](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@multimediamkt](https://forum.kirupa.com/u/multimediamkt)
#### Post date: [November 12, 2002, 2:30am UTC](https://forum.kirupa.com/t/button-with-three-actions-on-fails-one-of-them/7999/1 "2002-11-12T02:30:44Z")

</div>

button with three actions on fails one of them

* * *

on (rollOver) {  
setProperty ("\_root.carfurnbusmc", \_alpha, “40”);  
}  
on (rollOut) {  
setProperty ("\_root.carfurnbusmc", \_alpha, “100”);  
}  
on (release) {  
tellTarget ("\_root.infomovieclip") {  
gotoAndPlay (101);  
}  
}

* * *

A button is assigned with code above ;  
it happens sometimes the condition on release fails ; that means  
with only one click it does not cause the gotoAndPlay condition but  
the two setProperty conditions works perfectly ;  
I think too many actions on a button is not healthy ;  
Is there a way to improve the code to perform safely the same actions ??

MMKT  
nov 11th 2002

\<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0)” width=“250” height=“50”\>  
\<param name=movie value=“[http://sites.uol.com.br/vazzola/mmktxtdance.swf](http://sites.uol.com.br/vazzola/mmktxtdance.swf)”\>  
\<param name=quality value=high\>  
\<embed src=“[http://sites.uol.com.br/vazzola/mmktxtdance.swf](http://sites.uol.com.br/vazzola/mmktxtdance.swf)”  
quality=high pluginspage=“[http://www.macromedia.com/shockwave/download/index.cgi?P1\_Prod\_Version=ShockwaveFlash](http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash)” type=“application/x-shockwave-flash” width=“250” height=“50”\>  
\</embed\>  
\</object\>

---

<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: [November 12, 2002, 2:54am UTC](https://forum.kirupa.com/t/button-with-three-actions-on-fails-one-of-them/7999/2 "2002-11-12T02:54:46Z")

</div>

try

on(release){  
\_root.infomovieclip.gotoAndPlay(101)  
}

and make sure that you are actually releasing the mouse when you are on top of the button. You may want to add

on(releaseOutside){  
\_root.infomovieclip.gotoAndPlay(101)  
}

just incase the user is not completely on the button when they release the mouse.

---

<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: [November 12, 2002, 4:08am UTC](https://forum.kirupa.com/t/button-with-three-actions-on-fails-one-of-them/7999/3 "2002-11-12T04:08:16Z")

</div>

Or to have less code you can use a comma to seperate 2 actions that you want to do the same thing… like this…

on(release, releaseOutside){  
\_root.infomovieclip.gotoAndPlay(101)  
}
