Good Day,
I am a relative newbie to ActionScript (and forums of any sort for that matter). I am working to build an animated menu system with vertical slide down/up sub nav elements when the corresponding nav element is rolled over. I am able to get the menu to appear but I am running into trouble with the following items:[LIST]
[]the menu retracts on roll out with only the nav element or the appearing sub nav menu, not with both combined
[] buttons do not function on the sub nav menu likely because of conflict with hitarea[/LIST] My goal is to provide a smooth drop down sub nav menu that is accessible and calls forth appropriate content in the main area. The menu should appear when the nav element is rolled over, remain visible when the mouse is over the nav and sub nav elements, and disappear on roll out of either the nav or sub nav elements. Additionally I hope to animate the sub nav elements with background shading as the mouse rolls over or clicks it.
I have includded the code currently employed below. Also attached is the menu.fla file for reference.
I would appreciate any and all insight on this. As ActionScript (and its syntax) are still fresh to me, I would appreciate any guidance and corrected script code if possible.
Thank-you for reading this far and for any time you could devote to help.
Best regards,
KD
================================
ACTIONSCRIPT
[INDENT]MENU ROLL OVER / OUT:
[COLOR=Red]yTargetnavSrvDropMC = -100;[/COLOR]
[COLOR=Red]navSvrTopBack.onRollOver = function() {[/COLOR]
[COLOR=Red] // update state since menu needs to be open[/COLOR]
[COLOR=Red] yTargetnavSrvDropMC = 25;[/COLOR]
[COLOR=Red] moveFunc(navSrvDropMC,yTargetnavSrvDropMC);[/COLOR]
[COLOR=Red] navSvrTopBack.hitArea = hit;[/COLOR]
[COLOR=Red]};[/COLOR]
[COLOR=Red]navSrvDropMC.onRollOut = function() {[/COLOR]
[COLOR=Red] yTargetnavSrvDropMC = -100;[/COLOR]
[COLOR=Red] moveFunc(navSrvDropMC,yTargetnavSrvDropMC);[/COLOR]
[COLOR=Red] navSrvDropMC.hitArea = _root.navServices.navSrvDropMC.navSrvDropBack;[/COLOR]
[COLOR=Red]};[/COLOR]
SUB NAV MENU APPEAR / DISSAPPEAR:
[COLOR=Red]onClipEvent (enterFrame) {[/COLOR]
[COLOR=Red] ynavSrvDropMC = getProperty(_root.navServices.navSrvDropMC, _y);[/COLOR]
[COLOR=Red] movenavSrvDropMC = _root.navServices.yTargetnavSrvDropMC - ynavSrvDropMC;[/COLOR]
[COLOR=Red] setProperty(_root.navServices.navSrvDropMC, _y, ynavSrvDropMC + (movenavSrvDropMC/3));[/COLOR]
[COLOR=Red][FONT="]}[/FONT][/COLOR]
[/INDENT][FONT="] ================================
[/FONT]