I’ve a flash movie i created on a test server, i was hoping some could take a look at it and maybe suggest (help me through) giving it some interactivity. I posted asking for help before, but I stink at explaining. So, without further ado, the request for help, lead/followed by the link:
If you click on Services you will notice that the submenu/preview to that section tweens in. I have animated the reverse of that tween as well. Now, while Services is active (green window), if you click News, you will notice that Service’s reverse tween plays and News’ forward tween plays. If you click news again (and forever thereafter (an action that which at this time Services should trigger if clicked)), you will notice that only one of the green submenus is active at one time. Can someone please help me make it so that it works this way with all the submenus? So that only one is open at any particular time.
one option is to create a variable that tracks which section is open, and then a function that will dynamically evaluate a movie clips name and tell it to close when a new selection is made–here we go:
put this function on the root of your movie in the first frame:
function closeWindow (selectVar){
section=eval(selectVar +“MC”); //eval string that matches the name and path of the content MC–you’ll need to make sure your section names are consistent, as they’ll each have to be put together in this manner–also, this will vary depending on how your movie is set up–you’ll have to finesse the levels,parent/child/root, etc.
section.gotoAndPlay(“close”); //tells the dynamically named MC to goto and Play the frame labeled 'close, which matches up w. the start of the closing animation
}
on(press){
selectVar=_root.selectVar
_root.closeWindow(selectVar);
}
on(release){
_root.selectVar=myName; //set select var on root to equal my name
} //this sets the selectVar to the current mc name, which will be used to play its closing animation when the next mc is selected
again, you’ll have to suss out the levels, and other hierarchy stuff, plus you may or may not need to eval the name (try it both ways).
good luck, and let us know how it goes…
-mojo