PDA

View Full Version : FMX - Am stumped - need to play animation if other button is clicked



Demonia
August 4th, 2003, 08:51 AM
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:

thoriphes
August 4th, 2003, 09:19 AM
have you tried making separate different buttons with different actions that open a page or open a door? =)

blah-de-blah
August 4th, 2003, 12:37 PM
hmm sorry i'm not too sure what you mean. Are you trying to make a transition effect or something?

Demonia
August 4th, 2003, 03:24 PM
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:

blah-de-blah
August 4th, 2003, 11:40 PM
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

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 :-\

Demonia
August 5th, 2003, 03:03 AM
I think that is exactly what i need - I'll check it out - thank you very very much :beam:

D

blah-de-blah
August 5th, 2003, 03:05 AM
Thought so :P I'll still be here if you need any more help ;)

Demonia
August 5th, 2003, 08:50 AM
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: