# Button multiple actions

**URL:** <https://forum.kirupa.com/t/button-multiple-actions/35503>\
**Category:** flash\
**Created:** [November 14, 2003, 6:39pm UTC](https://forum.kirupa.com/t/button-multiple-actions/35503 "2003-11-14T18:39:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsummerfield](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jsummerfield](https://forum.kirupa.com/u/jsummerfield)\
**Post date:** [November 14, 2003, 6:39pm UTC](https://forum.kirupa.com/t/button-multiple-actions/35503/1 "2003-11-14T18:39:02Z")

</div>

Sorry for being a dummy but I purchased a Flash template and am trying to modify a button. Currently there are two actions attached to it:

**on (rollOver) {  
gotoAndPlay(2);  
}  
on (rollOut) {  
gotoAndPlay(11);  
}**

These commands are working fine and call for an animation of the button on rollOver and back to normal on rollOut.

I am trying to add an onrelease/geturl command at the end of the above commands, however, when I do and then cursor over the button, the rollover and rollout states cycle madly until I move the cursor away from the button. How can I preserve the rollOver/rollOut and still have the onRelease work without this conflict?

Thanks very much in advance for any help…

---

<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 14, 2003, 9:15pm UTC](https://forum.kirupa.com/t/button-multiple-actions/35503/2 "2003-11-14T21:15:46Z")

</div>

hmm most likely because after you release it going back to rollOver, but i really dont think thats the problem, but it could be.

**First** make sure your code looks like this…if it doesnt work ill have another solution for you.

```auto

on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(11);
}
on(release){
getURL("kirupa.com","_blank");
}

```

If that doesnt work make an invisible button. to do that make a box over your existing button on a new layer. f8 to conver to symbol, make it a button. go into the button and drag the keyframe all the way to hit. then when u go to your main timeline you should see a blue box, that is your invisble button and add the get url actions to there.

welcome to the forums…

---

<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 14, 2003, 9:51pm UTC](https://forum.kirupa.com/t/button-multiple-actions/35503/3 "2003-11-14T21:51:21Z")

</div>

Hi Digitalosophy,

Thank you very much for your post. I really appreciate your help…

As for the code, yes, that is what I had and that is what caused the button to cycle through the button states/animation repeatedly. See [www.mediapresenter.info/index-new.html](http://www.mediapresenter.info/index-new.html) specifically the “home” button. That’s my problem.

I tried to create the transparent box as you explained but it blocked the button underneath so the rollover didn’t work unless I strayed outside the transparent box boundaries. Should it do that?

Thanks!

John
