I have a menu com 6 buttons;
Each button calls an animation for the stage;
(I'm using the tween class as2)
1 - if I click on bt1, Mc1 enters the stage. (in bt2 enter the mc2, In bt3 enter the mc3, Etc.....)
2 - by clicking on bt2, This action must remove the mc1 the stage and soon after between the mc2.
3 - but rather than on click on bt2 I want to click the BT5, Then have to leave the mc1 and mc5 enter the, Ie.
Each button has the actions of, Corresponding to the mc him go on stage, If the stage is empty. If not the action would remove what is on stage and soon after presenting the mc corresponding to it.
If someone can help me.
Here's a file for you: http://www.grumblebee.com/stuff/cow/tweenOnOff.fla
The secret is creating a variable that holds a reference to the current movieclip on the stage.
Then you can do something like this:
if ( currentClip ) animateOff();
animateOff() will only be called if currentClip contains a value. It won't contain a value when the SWF first runs, because the user won't have pressed a button yet. But in each button's callback function, you make sure that currentClip get set. So in the future, there will be a value of currentClip to animate off.
Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer, Zeitbyte.com
To marcus geduld
Long sought so.
I am very grateful...