Flex :: Menu Control - Click A Button And A Menu Is Displayed. Click That Button A Second Time And Hide That Menu?

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


Similar Posts:


ActionScript 2.0 :: Senoc's Drop-down Menu - Only Disappear If Click On Another Menu Item Or When Click Outside The Menu

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

ActionScript 3.0 :: When Click In On Menu The Actual Menu Does An Alpha To 0 And The Next Menu Appears?

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

Flex :: Menu Created On Button Click?

Jun 19, 2010

I created a Button in MXMXL. On button click, I create a Menu as a child of the Button. I am using an XML datasource. The reason for creating it this way, was due to the amount of custom skinning involved. A popupmenubutton was not an option. Anyway, so my question is this: when clicking the button, the menu is displayed. However, if you click the button again, the menu reopens. I want the menu to close if the user clicks the button a second time. Now, I got it to work by setting a var after opening the menu, and then I check that var on each click to make sure that the menu isn't already open. If true, then it will close the menu, instead of reopening it. This works, until the user clicks away, in which the HIDE event gets dispatched and the menu closes. My hack no longer works.

View 1 Replies

Actionscript 3 :: Hide Default Options In Right Click Context Menu In Flex?

Oct 16, 2009

I'm developing a flex application and I want to add it a context menu. I got it with this

code:
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();

[code]......

View 2 Replies

ActionScript 3.0 :: Menu - When I Click On The Button , Alpha Return To 1 For The Previous Button?

Jan 12, 2011

i was making asimple menu .

ActionScript Code:
var currentLink:MovieClip = a_mc;
//buttons mode[code]...........

when i click on the button the alpha of this button will be 0.5 , when i click on another button the alpha of the previous button is still 0.5 , and so if i clicked on all buttons the alpha of all buttons will be 0.5,,,i didn't want that , i want when i click on the button , alpha return to 1 for the previous button .

View 5 Replies

ActionScript 2.0 :: [F5] Button [renamed] - When Click On The Menu Button A Image Will Popup In The Ipod Screen

Jan 1, 2007

i new to actionscript and am not sure where to begin so i will explin what i would like to do. i have a myspace site that i have created a div overlay with...<a [URL] now what i would like to do is use actionscript so when you click on the menu button a image wil pop up in the ipod screen and when u click the play button something else will pop up

View 6 Replies

ActionScript 3.0 :: Add A Back Button Once Click A Main Menu Button?

Apr 9, 2008

I'm trying to add a back button once I click a main menu button then remove the back button once it is pressed. I get the title error.

[Code]...

View 6 Replies

2nd Click To Hide Pop-up Menu?

Oct 7, 2009

I have a Movie Clip configured as a Button and I wanted to know how to make the cursor transform into a pointer (little hand) when it's over tat movieclipBut well that was just not the point of the Post what really interests me is that when I click that MC a Pop up menu appears (another MC) but if i decide not to click any of the buttons in that menu the menu will stay there until I click another button or something and i will want it to disappear if a click it for a second time or something like that.

View 1 Replies

ActionScript 2.0 :: Click Button In One Menu And Deactivate Same On Second

Feb 24, 2010

Is it possible to do this: Have two separate menus on web page. Want to reload or send some variable or any kind of way that if you click any button in one menu it also deactivates any pressed button in second menu...

View 1 Replies

ActionScript 2.0 :: How To Hide Mouse Right Click Menu

Oct 31, 2008

Is there a way to hide the right mouse click pop-up (settings & about flashplayer x). The swf i use is placed in HTML refering to two other pages with some java games. The problem is that this is running at a science center in a browser fullscreen. But people may not open a new window/tab (this happens when you click on "about flashplayer x). I found this: [URL] but is there something similar in AS2? I can use JS.

View 1 Replies

ActionScript 2.0 :: Create A Custom Context Menu (right Click Menu) In Flash?

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

ActionScript 3.0 :: Flash Menu - Two Click Functions On One Button

Feb 23, 2010

I'm making a menu in flash and I want that when I Click the button/movieclip moves up and when I Click again it moves down again. I already did it with MOUSE_OVER and MOUSE_OUT but that gave me problems.

Here is the Code:
Actionscript Code:
//Eventlistenersmenu_over.buttonMode = true;
menu_over.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
menu_over.addEventListener(MouseEvent.CLICK,onOut,false,0,true);
//Functionsfunction onOver(e:MouseEvent):void {menu_over.gotoAndPlay("menu_op");
}function onOut(e:MouseEvent):void {menu_over.gotoAndPlay("menu_beneden");
}

View 1 Replies

Actionscript 3 :: Remove Button On Right-Click Menu Option?

Jun 12, 2011

A "Remove" context menu item is to be shown when the user right-clicks on a button. If the user clicks on the "Remove" option, that button should be removed from its Tile parent container. How would I implement this using Flex 3 and ActionScript 3?

View 1 Replies

ActionScript 3.0 :: Menu Button Click To Load External SWF

Jun 26, 2009

I was getting in to transitioning from AS2 to AS3 a while back and had designed a page that had menu buttons that when clicked, loaded an external swf in to a container. Pretty simple accept for the fact that it was a while ago and my computer crashed so I'm having to redo this and learn it all over again. I have read in to flash on the subject but I am not to sure on the best way to go about this. I know there are a lot of people on here who make thing a lot more simple and structured than I do. I'm so used to putting the actionscript on the button and I'm a little stuck on the best way to combine the actionscript for the button and loading the swf. I would need to make a button load an external swf in to a container when clicked? I figure I just need one and then I can copy it to all the other menu buttons.

View 2 Replies

ActionScript 3.0 :: Context Menu - Add A Right Click Menu With A Custom Item? ?

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

ActionScript 2.0 :: Make A Button That When Click It Returns Frame Menu

Jul 5, 2009

What code would I use to make a button, that when you click, it returns you to frame one. Gotoandstop doesn't work.

View 1 Replies

ActionScript 2.0 :: Menu - When Click On A Button It Scrolls Over Either Left Or Right To A New Content

Mar 21, 2005

does anyone know the tutorial that when you click on a button it scrolls over eitehr left or right to a new content kind of like this [URL]

View 4 Replies

ActionScript 2.0 :: Drop Down Menu When Click On Another Menu Item?

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

Actionscript 3 :: Flex - Hide A Menu Item From Menu?

Feb 22, 2012

How to hide menu item from Menu object ?

View 1 Replies

ActionScript 3.0 :: User To Be Able To Rollover Menu Button And Click It When The Page Loads

Jul 31, 2009

When the page loads, the first menu button (PORTFOLIO) is automatically OnClick. I want the user to be able to rollover it and click it when the page loads. I attached my file.

View 0 Replies

Actionscript 3 :: Menu Bar Control In Flex , Handle Separate Method For Individual Menu Item?

Jun 26, 2009

i need to fire separate method for individual menu item clicked ,so that individual item can handle separate method.and i need know what all the properties are available in menu item like type="radio".

<mx:MenuBar id="jj" labelField="@label" itemClick="MenuItemClick(event)" x="23" y="228">
<mx:XMLList>
<menuitem label="File">[code]......

View 2 Replies

ActionScript 3.0 :: Flash Menu Animation - Portfolios Button To Have Sub-menu For Each Portfolio Category

Mar 17, 2009

I'm making my new photography site, and it's going to be entirely in flash. I'm an intermediate flash person, but there is something I'd like to do with my menu that I can't figure out how to do. I'm going to have 4 buttons:

[Code]...

View 5 Replies

Android - Mobile Use The Menu-stuff Provided Or Is It Better Not To Because The Iphone Does Not Have A Menu Button?

Sep 16, 2011

I would not have asked the question if I owned an iphone, but so far I only have an android phone for development.

The question is: Should I use the View.viewMenuItems that are provided by flex mobile? Or should I better embed the functionality in another way? I don't know what possibilities might exist on iphone to open the menu, because it has no hardware button "menu".

By the way: How could I open the menu in the Flash-Builder mobile device emulator - there are no buttons, too..

View 2 Replies

ActionScript 2.0 :: Flash Actions - Get The Picture Menu To Keep Moving And Not Just For The First Time When Click On The Arrows

Jul 25, 2010

I have got the banner on this webpage [URL] made from a guy in India but i want to add an additional feature. When i click the left or right button multiple times how do i get the picture menu to keep moving and not just for the first time i click on the arrows.. Is there some action script that i can include??

View 3 Replies

Flex 4 RichEditableText With Right Click Menu?

Sep 13, 2011

I need selectable text that can be copied. Some users are used to copy with Ctrl+C (Cmd+C on Mac), and some are used to right click and select "Copy".

Using s:RichEditableText, there is no "Copy" in right click menu: http://d.pr/xWXW. Using mx:Text, there is "Copy" in right click menu, but it doesn't copy anything: http://d.pr/vtiw

Ctrl+C works for both s:RichEditableText and mx:Text.

Is there a property or something to enable "Copy" in right click menu for s:RichEditableText?

View 1 Replies

Flex :: Remove Right Click Menu In Swf?

May 25, 2009

i made swf using flash 9 player if i right click swf it will shows menu like zoom in , zoom out, etc option . but i saw this site url [URL] animation swf like elephant.swf, bird.swf... not show anything .only shows reddraw option How can i do like this ?

View 6 Replies

ActionScript 2.0 :: Building A Menu And For Each Button Of The Menu?

Mar 31, 2007

I am building a menu and for each button of the menu, subbuttons apear beneath it along the menu. And I am having some problems. Each of the menu buttons has animations for rollOver and rollOut. What can I do so that when I move over the subbuttons the menu button won't start the rollOut animation. I have to extend the hit state. If I put the subbuttons in the same movie clip as the menu button, the animation would be bad because I am doing width, height, x and y tweenings with ActionScript and addind something the the clip would change these properties. Pls help.

Is it possible to extend the hit state of the menu button in some way ?

View 1 Replies

ActionScript 3.0 :: Click To Open Menu Then Click To Close?

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

ActionScript 2.0 :: Expanding / Collapsing Menu - Should Have Remember The Last Visit Menu And Show The Menu

Jun 5, 2004

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.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved