I have a button that reveals a movie clip (menu) how can i make it that on the first click it moves the the fade in of my menu, and then the second click to the fade out
ive tried onRelease, and all, maybe my if statement isnt right?
thanks for your time
You should workt with a variable, lets call it menuActive.
When we first come in the movie menuActive will be false.
Then when we click the button, menuActive it will be set to true.
Finally some code within the button will check if the menu is active or not.
On your first keyframe:
menuActive = false;
Attached to your button:
on(release){
if(_root.menuActive){
menuMc.gotoAndPlay("fadeOut");
_root.menuActive = false;
}
else{
menuMc.gotoAndPlay("fadeIn");
_root.menuActive = true;
}
}
:mu:
thank you, but my button is not a button its a movie clip…im sorry for the misdirection…any ideas
well, it should also work for a mc.
But if ur mc is the one that holds the menu, it would be something like:
on(release){
if(_root.menuActive){
this.gotoAndPlay("fadeOut");
_root.menuActive = false;
}
else{
this.gotoAndPlay("fadeIn");
_root.menuActive = true;
}
}