ActionScript 2.0 :: Close Drop Down Menu On Click?
Sep 24, 2009
This feels pretty hacky, but don't have a better way yet. I put an invisible button on the stage behind the drop down and gave it the onclick event to close the menu. Sometimes it works and sometimes it doesn't. Seems like it is being covered up by something occasionally, but there is nothing there to cover it up and it is VERY inconsistent as to what mouse locations it does and doesn't work in.
View 5 Replies
Similar Posts:
Jan 17, 2004
ive followed Senoculars drop-down menu tute [URL], awsome stuff, but it seems the submenu's dont disappear to well when you roll out. ..They only disappear if you click on another menu item or when you click outside the menu.
View 12 Replies
Nov 21, 2011
I'm creating an animated (in and out) drop down menu. I've managed to get the menu to open when the user mouses over, with the buttons all selectable. However I can't seem to find an efficient method of making the drop down menu close whenever the mouse is not over the menu. Actions:
[Code]...
View 2 Replies
Sep 28, 2011
I've got a drop down menu. I want to click a tab to make it drop then, if it's open, click it again to close. I've tried a million variations on the script below:
var btn_grp1:String
function main1Down(event:MouseEvent):void {
if (btn_grp1 != "dwn") {
[Code]....
This works too (once). So the drop down buttons all disapear again, but it won't re-set. The drop down menu stays up from then on.
BTW i'm not set on this method, it just seemed the most obvious i.e. if menu hidden, then show it, set some variable to down (showing), else hide the menu, set var to up (hidden). Not working though.
View 2 Replies
Jul 8, 2010
I am an extreme novice in Flash and I've built a drop down menu following a tutorial from YouTube - sadly this took me days! It functions BUT fast mouse movement away from the menu drop down seems to prevent the drop down menu from closing. Does anyone know of a fix for this?
Second question - I know how to create text links but when I do this the text's position jumps down without me having told it to. So is there a way to apply a link to a button rather than the text in the button, and is it possible to also apply a link to a movie clip?[URL]...
View 1 Replies
Nov 13, 2002
I have an array for my menu and submenus.It works fine, but I have to click again on the menu to close it.When it's open it's completly open it takes too much space.how I could make a menu close when I click on another menu item..this is the code on the frame on my main timeline:
MenuArray=new array();
MenuArray[1]=menu1;
MenuArray[2]=menu2;[code].....
View 1 Replies
Jun 26, 2006
Is there a way to completely get rid of that right click drop down menu and use it for something else Eg. scrolling
View 2 Replies
Jun 16, 2006
I am trying to build a website that uses the XML menu in kirupa tutorials. However, I am trying to customise it but I am having problems trying to solve this impossible task! Basically, instead of it being a drop down menu, I am trying to make the menu work on Click instead on RollOver. When the user clicks "on" a link, the link will keep an on state. And when the user clicks on the sub link, that sub link will keep an "on" state.
However, when the user selects a different menu item on the main level, the other "on" states will turn off. So basically I am trying to set up perhaps a variable that remembers which menu item is on and loops through the same level and automacally switches the other items off. Is that confusing? I AM!
View 1 Replies
Jun 20, 2010
Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.
How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:
<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;
[code]....
View 1 Replies
Jan 27, 2010
The menu is like this http:[url]... (the site is in portuguese but it doesnt matter), when I click in on menu the actual menu does an alpha to 0 and the next menu appears using the alpha from 0 to 100 (and some animations like the cellphone going up).Now, how can I do a menu like that, whatever the menu I choose, it does that alpha animation ?
View 1 Replies
Mar 10, 2006
I have created an XML driven Drop Down menu using the kirupa tut by Senocular found here. I am trying to figure out how to get the submenus to push the rest of the main menu down on rollover kind of like this. Not sure where to start to get the AS to get the button created fromt he XML nodes to move down.I haven't changed the code found int he tut too much and the menu works fine except that the rollovers just go over the main menu.
View 1 Replies
Aug 13, 2009
Can somebody take a look at my .fla file and tell me why exactly my menu is not dropping down at all?If you download my file go to scene 3. that is where my Navigation Bar is.URL...
View 1 Replies
Mar 17, 2010
Each time I make a drop down menu I face some problems, For example, when I use tweening to roll out a menu ( via ROLL_OVER/ ROLL_OUT), sometimes the menu gets stuck, or starts flickering after it is rolled out if I move the cursor away, and move back on it.
How could I solve this, should I use a timer to disable the button until the tween finishes (or this would be good for nothing)?
[code]...
View 5 Replies
Apr 16, 2004
I love Senocular's XML-Driven Drop-Down Tutorial. But I can't seem to get it to make the menu headers look different from the submenus.
View 5 Replies
Feb 12, 2004
I need a tutorial for a hierarchical drop down menu system that drops down 3 sub levels. Do I make the items in the sub menus individual buttons and then insert them into a movie clip or make every sub menu item a movie clip and insert them into buttons?
View 1 Replies
Apr 16, 2004
I love Senocular's XML-Driven Drop-Down Tutorial. But I can't seem to get it to make the menu headers look different from the submenus.
(and if anyone is interested, i've turned it into a horizonal menu... reply and i'll post the code. better yet, help me fix the GUI issue and i'll post it )
View 5 Replies
Oct 13, 2005
I need to add a drop down menu to the main menu button called "galleries".
The menu came from one of the awesome kirupa tutorials here, and below is a link to my existing menu w slider:
[URL]
When I try to add a popup menu to "galleries" to the over state in galleries, the popup menu dissappears when you rollover the first item.
Here is the .fla, click on gallery, and open up popup_but to see what I've done in the "over" state:
[URL]
This if my first flash site, and I long over schedule
View 10 Replies
Apr 16, 2009
i'm working on a project where i would like to build a menu of 3 buttons in the bottom of my screen, when 1 of these buttons is clicked a little popup MC pops up with a X sign to close it. WHen the popup is active the background (the buttons) fade to a 30% alpha and a re not clickable anymore. When i close the popup MC with the X sign then the buttons are active again. I seen a tutorial how to do this but i lost it.
View 2 Replies
Jan 29, 2009
I have a movie clip that sits just of my stage. When clicked the mc slides out based on the _x,_y position. The problem I have is how do I close my menu or reset it back to it;s original position as to appear closed. Heres the code I've placed in the timeline:[code]indicate what code would I use within the 'else statement'. I have this cmmon problem when I want a button to provide a loop type function. I.e toggle sound on and off with one button.I want this menu to be available all the time so it would sit in the _root (index swf file). The rest of the pages are called using loadMovie as external files.
View 1 Replies
Dec 7, 2002
Anybody know how to create a custom context menu (right click menu) in Flash?
If it's not possible, wouldn't it be a good idea for Macromedia to put some kind of event or something in there?
View 11 Replies
Sep 23, 2009
Im trying to get my flash player window to close, when I click on a button. I have tried various code from the net but nothing seems to work. Im building in Flash CS4 on a mac.
View 2 Replies
Nov 12, 2007
I have a swf that is being loaded into another swf without a "container" clip (which i am not quite sure how to implement). The loaded swf has _root references so in the very first line of script i placed this:
[Code]...
I also have embedded MC that refer to this _root script. So my problem is that the swf loads but the script which is supposed to close a menu when one menu is opened does not work, they just all stay open when i click other menus.
View 14 Replies
Oct 8, 2009
i wanted to place some credits item in the right button menu (no links, so no events, just a label with credits). i was looking the contextmenu help, and there is an example of how to add items, disable default items and so on, but i could not find how to attach the menu to the movie (the basic part). i tried both on 'stage' and it tells me that stage does not have a property called contextMenu, so i tried to attach it to a sprite, it runs ok and compiles ok but when i right click on the sprite i get the default menu
var _menu_item:ContextMenuItem = new ContextMenuItem("here goes [code].....
how to add a right click menu with a custom item?
View 3 Replies
Nov 10, 2009
I'm creating a drop down menu and when I addEventListeners to check the clicks on the invisible buttons on frame 19 of the "menu" movieclip, it gives me an error. T really hate doing rollover with actionscripts. The download link for the fla can be found in below. Sorry for posting an external download link as the file is 7mb+! [URL]
View 2 Replies
Jun 30, 2004
I'm having a problem destroying a pop-up.The window creates beautifully, but does not close on click of the 'x'.Here's the code
Code:
buttonListener = new Object();
buttonListener.click = function(){[code]....
View 1 Replies
Sep 24, 2009
I am currently trying to modify a Polaroid Flash photo gallery template. Currently it is setup so that when the user double clicks on the thumbnail, the photo enlarge, when they double click again on it, it closes it down. I'm trying to get it so that they only have to single click to close the enlarged photo down, as supposed to double click. I have found the section of code that controls this, I've tried playing with the numbers, but I still cannot get it to work:
[Code]...
View 0 Replies
Aug 26, 2010
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.
View 2 Replies
Aug 22, 2009
i had desined a drop down menu for a html page in flash. It reads the menu items from a XML file and extends itself.Now the things is what height and width should i set for it. If i set the height of the menu, in the html file the dropped menus are not displayed.
View 1 Replies
Aug 26, 2009
any Action Script tutorials to activate the menu and sub menu found here:currently the drop down menu is part of the "over" frame of the button.this flash project will function only as a menu for an HTML site (probably using HTML frames). I am brand new to action script but have experience with basic key frame animation.
View 3 Replies
Dec 16, 2009
I've been trying to to create a flash drop down menu for weeks now,i am trying to do a drop down menu that comes over the HTML items. i am using flash cs4 with Action script 3i would add the file but i cant.
View 1 Replies