Button usage on conditional events

Hi all

I have created two buttons which in turn control two movieclips

button A controls the fade in and out properties of called “content”
button B controls the fade in and out properties of called “content2”

I have been able to tell button A to fade out the movieclip called “content”
and then to fade in the movieclip called “content2”

I can also tell button B to fade out the movieclip called “content2”
and then to fade in the movieclip called “content”

What I am struggling to do is when you FIRST press either button at the start to just play that buttons specific movieclip e.g

button A = mc_content
button B = mc_content2

I know that I am needing a conditional statement of some sort but I got no clue on how to approach it. Any help, advice examples etc would be very helpful to me

thanks all

w9914420

a sample of my file

anyone any ideas?

I downloaded your fla and I’m still not clear on what you’re trying to achieve. When exported, after you click the “a” button once, it fades in a clip, then you click it again and the other clip pops up to 100% alpha and fades out. Doesn’t look like it’s working right, but I’m not sure what you’re going for.

yes thats correct its not working how i planned.

basically what I want to happen: (im listing this as functions of what should happen)

1.when u press button “a” the movieclip “content” fades in *

  1. when u press button “b” the movieclip “content” fades in*

*so which everone u press first will result on one movieclip being displayed at that time

  1. So you have selected a button, with the selected button if you press it again the assigned movieclip to it will fade out*

*so in the first instance whether you choose the button A or B if you should press the same button again the assigned movieclip will play its fade out sequence.

I hope i aint lost you - but that is part 1 of my senario ok i shall explain part two.

  1. If button “a” is pressesd then movieclip “content” fades in but if you then press button “b” then the movieclip “contents” fades in and the moveclip “content” fades out*

the same also applies for button “b” as well If button “b” is pressesd then movieclip “contents” fades in but if you then press button “a” then the movieclip “content” fades in and the moveclip “contents” fades out

so what im wanting is only one movieclip displayed/seen on the stage at one time, a button can fade in and out it’s assigned movieclip, but if you press a another button then its movieclip will fade in and the other movieclip will fade out.

i hope this helps

you kind of lost me with your second explanation :))… but… I’ve tryed something.
Take a look.
I put some 2 more butons … but1 and but2. and a variable inside each movieclip. When either of your mc “fadein” the ison var is set to true… and respectively to false when either of your mc’s “fadeout”

Hope I made it as you wanted it :slight_smile:

not sure if that’s exactly what he’s looking for, but here’s a very simple example that does what you want using a boolean value and a simple conditional to indicate which clips should be faded out and which should be faded in. I removed all actions inside of your buttons, I think you were making it a bit too confusing for yourself. This way all the script resides on the stage-level MC’s.
If you want your buttons to toggle their color as before, you’ll have to set up a similar script for them.
Hope this helps

Thank you all soo much, I had a play around with them both and that is exactly what i was looking for thank you monkeyfresh and virusecu