ActionScript 2.0 :: Accordion Menu Not Collapsing Entirely
Sep 18, 2007
So if you click on Capital Strategies group on this page: [URL] you'll find a .swf file that has a collapsible menu (accordion menu). Everything works great except for two problems:
1. There is some sort of wierd masking occuring that's clipping the bottom of the menu as you'll see.
2. The items don't collapse entirely.
I assume this has something to do with actionscript but as I'm sifting through it I'm just not having much luck.
I have created this site with a expanding / collapsin menu. When a user selects a menu e.g. "hammers" then the menu is loaded and show the submenues. When the users closes the menu by moving the mouse away from the area the menu collapses. If the user expands the menu again the menu should have remember the last visit menu and show the menu.
I made a simply drop-down menu in MX with an invisible perimeter around the drop-down part that will collapse the menu when rolled over. Most of the time, this works. However, I've noticed that when running the mouse quickly over the button (side to side quickly, for example), the menu will occasionally open but not close, and I have to roll over it again (crossing the perimeter) to collapse it.
I have created this site with a expanding / collapsin menu. When a user selects a menu e.g. "hammers" then the menu is loaded and show the submenues. When the users closes the menu by moving the mouse away from the area the menu collapses. If the user expands the menu again the menu should have remember the last visit menu and show the menu.
I need to make an xml generated menu that when the user clicks on an option, the menu closes down to show only the clicked item, then it opens a new submenu. unfortunatly my knowledge of AC is VERY limited
here's the code I'm using so far
Code: // ActionScript Document GenerateMenu = function(container, name, x, y, depth, node_xml) { var curr_node;
This was part of a previous post , since I cannot figure how to re do the AS to call actions to a frame i will have to do the menu from scratch. here is the original [URL] I need to re create the animation which I have done using 4 movieclips and eventlisteners for mouseevents. On rollover mc expands On rollout mc closes. problem is I need to figure a way that when you rollover an mc it is called to the top or front of the other 3 and can open without being obscured
I was wanting to use this code for a project: trouble is I can't have the file call any extraneous files. Since I am still learning I am not sure how to go about adusting this code. Essentially I need it to function exactly the same but using the AS3 Tween Class in place of Tweenlite.
///////this is the code I would love to alter!///////// import gs.*; import gs.easing.*; panel1.props = {lx:0, rx:570, ind:1};
i've been looking for a decent accordion menu forever. a coded one, not that component crap that you can't customize worth a damn. i couldn't find one that didn't make my head hurt or didn't require the menus, etc. to be created beforehand. so i finally knuckled down and made one. lazy me. and since i've seen a bunch of posts looking for them, i thought i'd put my efforts here for everyone to use and enjoy. nothing like bashing your head against a wall trying to do something simple.
the code is VERY flexible and quickly adaptable to XML implentation (which i'd actually originally did this for). and, best of all, everything is customizable. out the hoo-hoo. oh... and i commented the hell out of it for my staff, because it's often better to know WHY something works so you can learn from it and use the principles in your own stuff. there are a couple of finesse things with regard to the spacing that just need a tweak +- 1 pixel... but i thought i'd get this up before i move on to something else.i'm working on making this into a class and when i do, i might throw it up if anyone is interested. and mad thanks to the 'lmc_tween.as' crew. i know Zigo is the new deal, but there's life in the old stuff yet!
url...In basic tutorial there is extra part of button where you add menu name "home, about us" etc.But I don't need this. I needed more simplier. From xml file I load an image or swf. And then you just mouse over it and it moves and it clicks. No extra 30 pixels for button space.If i change AS line ldr.x=0 to ldr.x=27 then it moves, but there is extra unnecessary empty space between content things. I don't need it. What should I do?
I am having a little trouble trying to design something similar to this:I tried to do layers with buttons and MC's but it didn't work very well. I think they are using the accordion feature but modified...
i have to make a accordion menu for a client and i have never used the accordion component. is that the best way to go about it or is there another way that is easier and nicer looking?
I'm fairly new to actionscript and am trying to create an accordion menu that contains three submenus. The idea is that when you mouseover one submenu (or rectangle, to keep it simple) that the rectangles which were previously covering it will move to reveal it. If you want an idea of what I'm talking about, menus of this type can be found at the bottom of nvidia's[COLOR=blue ! important][COLOR=blue ! important][/COLOR][/COLOR] site ([URL]) for reference.
At first I tried creating each function, which will make the rectangles move, separately but this resulted in three very repetitive functions and there seemed like there should be a better way, especially since I'd like a good way to add and remove submenus. The animation did work then. I tried to clean it up by creating a for loop that would move each rectangle but now, for some reason, it doesn't work. It is still missing some key points such as utilizing the mOver variable to figure out when each rectangle is moused over Here is the code so far and the very sparse file is attached.
I've seen all kinds of accordion menu examples that allow for one pane open at a time, but I really need one that can have more than one open at a time.
I must say I'm pretty new to AS3.0 and last night I tried to develop this accordion menu. It's not XML driven nor does it use AS3.0 to create each "button". What I did was create individual "menus", basically like drop down menus, and converted them into separate movieClips. Also inside of them there's a button movieClip which is the larger one that opens the menu (instanced "btn"), a reference movieClip called tabHeight to define its height - since it can depend on the number of "sub-menus" you have - and a tabMask that onClick (is supposed) to open and reveal the "sub-menus" while making everything move according to that change. I want it to basically start with all menus closed and onClick it reveals each menu, making the necessary y movements. I am getting some errors and I can't make it to work.
Code: Select allvar growingTab:Object; var reducingTab:Object; var tabArray:Array = [tab_0, tab_1, tab_2, tab_3]; for (var i:int = 0; i < tabArray.length; i++) { var tab = tabArray[i]; [Code] .....
For a simple accordion menu design in flash we have to writting classes that requires advanced knowledge in writting object oriented as3.0.But in javacsript we can make an accordion menu with jquery in just a minute.Is there any effortless way to create accordion or sliding menu instead of incommodious AS3.0 Classes?
I was going to attempt to create a vertical accordion menu with a genie effect this week.So it'll be like your normal text based accordion menu but the entries will shrink and grow depending on where your mouse is.I've never ever seen this specific type of menu before and I'd quite like to get a look at one to visualize how it should behave.
I have an accordion component on my stage and I really do not even know where to start to do .I found this code on the Adobe help pages and it causes the movement of the accordion to bounce... which is great... but my problem is populating the accordion with the data.
My accordion is called "top_acc".I have three(3) labels... (FIRST,SECOND, and THIRD) Within there i would like arrays to be displayed for the select label.My arrays are defined and when i trace them i get exactly what i am looking for... the format of the code to add an array to my accordion...then upon selecting the item in the array displayed i would to be able to display that same array value in a text box called "my_selection" ....also the amount of items in the array are not static and change day to day..
I'm trying to create an xml accordion menu that has main menus and a sub menus buttons (movieClips) revealed with a mask. Simple question, How do I stop the mask area which reveals the sub menus catching mouseEvents on the submenus?The main menu button is a movieClip, it has the mask sprite attached to it as a property so it can scale dynamically to reveal the subMenus. They are set as children of the main menu button container. In my code I've set mainMenu.mouseChildern = true. But when the mainMenu is clicked I change mouseEnabeled = false to help prevent the main menu receiving events. This helps on rollOver rollOut events, but when I click or mouseDown on the subMenu the mask catches the event also and activates the main menu again. I've tried the obvious mask.mouseEnabled = false; mask.mouseChildern = false; mask.hitArea = null; and even setting mask.alpha = 0 but this has no effect at all.
I don't understand why the mask has to extend the hitArea property of the mainMenu and why this can't be set to null. It also seems crazy that when mouseChildren = true the parent clip also has to receive notice of the event.
I've got a rollover menu bar of buttons that opens up a list of sub-items below each button when you roll over it. Pretty standard, right? Then once that movie plays (sub-items appearing), a thin box appears both around those items and the menu bar's actual button, meaning that once the mouse pointer moves off of either the button of the sub-items, the movie disappears (that's what my invisible button is set to do). And herein lies my problem.
While the button works almost always, if I drag the mouse pointer very quickly over the active area, the button fails to activate. So I can literally keep my pointer at one side of the screen and race it over to the other side, activating all the sub-menus and making them stick in their 'open' position. Someone on these forums suggested increasing my framerate and I've set this to maximum. It makes the problem less frequent, but doesn't fix it. This problem happens both in the preview window and my browser (Firefox, Vista).So I guess at this point I either need a way to 1) Fix the problem and make them close, either by tweaking what I already have or making a rollover menu by a different means or2) Add something to each item like a 'timeout', where if there's no pointer present for, say, 1 sec, the it closes automatically. But I don't know if such a thing exists, especially in an older version like MX.
My problem that I'm having is I am trying to build a menu consisting 3 buttons, side by side that open and reveal subnavigation buttons on rollover. Then on rollout of the main container button, they close back to where they were. I have built the buttons and everything works great, the only problem is that on rollover of the internal buttons, the main button senses this as a roll out and plays the rollout animation event (closes the button). How can I make the main button not sense the rollovers of the internal buttons and only play the rollout event on rollout of the main button?
I found there is a gap between the datagrid and the second accordion tab. The more HBox I add, the bigger gap it has.Workaround:I tried to add verticleGap = "0", this fix the problem. But according to the documentation, verticleGap by default is -1, which still should not see the gap.[URL]
The accordion i created works by recreating a single movie clip as the frame/holder for each and every 'tab' the accordion has.Now I want to have seperate links for each 'tab'. which means, at the 1st tab for example, if you click anywhere on the content area, it will take u to page #a.If you go to the 2nd tab, click, it will take u to page #b.
the current flash file has holders in it in order to let it load the xml data. such as the tab titles, content etc. they are also reproduced in AS hence there is only one instance of each in the FLA.I have created an area which is TO BE the "clickable" area on each page. But i do not know what else to do from here...