# FMX - Am stumped - need to play animation if other button is clicked

**URL:** <https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587>\
**Category:** flash\
**Created:** [August 4, 2003, 12:51pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587 "2003-08-04T12:51:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Demonia](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@Demonia](https://forum.kirupa.com/u/Demonia)\
**Post date:** [August 4, 2003, 12:51pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/1 "2003-08-04T12:51:35Z")

</div>

Ok, I have been searching for a way to do this for about 3 days but I have come to no conclusion. I need to find a way to get an animation playing when a button is clicked. It is a little more complicated so let me try and explain. I have an animation of two doors opening and closing. From frame 35 - 65 the doors open, on frame 65 I have text, then from 66 - 96 the doors close. Now my problem comes when I want to change pages. I need the animation on frames 66 - 96 to start playing when any other button is clicke except for the one that opens that page. I have the delay on the buttons and it is working fine but i have no idea how to test if the other buttons are clicked. Do i test the state of the button or how?

Thanks a million all.

D :beam:

---

<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:** [August 4, 2003, 1:19pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/2 "2003-08-04T13:19:18Z")

</div>

have you tried making separate different buttons with different actions that open a page or open a door? =)

---

<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:** [August 4, 2003, 4:37pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/3 "2003-08-04T16:37:51Z")

</div>

hmm sorry i’m not too sure what you mean. Are you trying to make a transition effect or something?

---

<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:** [August 4, 2003, 7:24pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/4 "2003-08-04T19:24:57Z")

</div>

yup, something like that… I’m not sure how to explain it any better and the .fla is way too big to post… :(. Let me go through it again:  
Frame 65 - 75 = animation of doors opening under which is a layer of text, for example “FAQ”  
frame 75 - 85 = animation of doors closing on top of text layer FAQ  
frame 75 has a stop action so that the text is visible until someone clicks another button  
frames 85 - 95 = animation of doors opening under which is text layer “news”  
frame 95 - 105 = animation of doors closing on top of text layer “News”  
frame 95 has a stop action so that the text is visible  
There are around 5 pages at the moment.  
The problem is that if I do a simple gotoAndPlay action on the buttons it works fine if people press the buttons in order… if not then a different layer of text appears underneath (not the one the page they were) so I need to test on the frames where i have the stop action if another button has been clicked so that the animation of the closed doors plays and then goes to the right frame of text.

Please, please, please help me cause it is driving me nuts… :hangover:

---

<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:** [August 5, 2003, 3:40am UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/5 "2003-08-05T03:40:31Z")

</div>

ah i sort of understand now. Well actually i’m pretty confused :-\

Do you want something like this?  
[http://www.kirupa.com/developer/mx/preloader\_transition.htm](http://www.kirupa.com/developer/mx/preloader_transition.htm)

or something else? I’m assuming frames 1-64 are all opening tweens right? Maybe you can try cutting those out, zip it and post it here :-\

---

<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:** [August 5, 2003, 7:03am UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/6 "2003-08-05T07:03:22Z")

</div>

I think that is exactly what i need - I’ll check it out - thank you very very much :beam:

D

---

<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:** [August 5, 2003, 7:05am UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/7 "2003-08-05T07:05:41Z")

</div>

Thought so 😛 I’ll still be here if you need any more 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:** [August 5, 2003, 12:50pm UTC](https://forum.kirupa.com/t/fmx-am-stumped-need-to-play-animation-if-other-button-is-clicked/27587/8 "2003-08-05T12:50:06Z")

</div>

I just wanted to thank you very much … it worked like a charm… I didn’t even consider that because i had everything in one .fla but now i separated them and it works beautifully…plus it isn’t so messy :beam:. Again thanks a million

D :beam:
