View Single Post
  #1  
Old 03-04-2010, 07:36 PM
lendeavor lendeavor is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
lendeavor is on a distinguished road
Default Collapsing/Expanding Menu Help

I feel cursed. Seems like some days no code I write, even though it should work, just won't work. Here's an example of what i'm trying to do.

I'm building a simple menu that collapses and expands to reveal a lower level within the navigation. I'm using actionscript 2.0 cause that's what the site template i started from was using.

The code in question looks like this:

on (release) {
if (_root.link<>num) {
if (_root.link == 1) {
_root.submenu.but1.gotoAndPlay("s2");
}
_root.menu1.gotoAndPlay("open1");
_root.link = num;
}
}

So far, this works perfectly fine to expand the section of the menu. My problem lies in writing code to check if a portion of the menu is already expanded, and close it prior to opening the new section. The animation for open/closing exists in the parent of the movie clip on which this code resides.

I was hoping to set something like a sectionOpen = true or false, if statement that would play the collapsing animation prior to playing the next expanding animation.

Any help would be very appreciated.
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote