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
Similar Posts:
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
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
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
Nov 10, 2009
How to make right click menu in Flash with "open in new window" for sIFR link?
Can we make in sIFR3 directly?
View 1 Replies
Jul 25, 2007
I am creating a navigation bar in Flash (which will then be used in Dreamweaver). When you mouse over each topic in menu (ex. Products), i want it play a movie clip (so it shoots out a sub-menu underneath). so far so good, but the only thing is, the sub-menu won't stay open in order for me to click on buttons in it. For each button, I assigned it the Behavior to go to a url. Also, I tested the buttons within the mc and they don't seem to direct me to url. do you think maybe it's because it's nested within the movie clip?? Is there an easier way to go about this?
[Code]....
View 2 Replies
May 12, 2010
Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?
View 3 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
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
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
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
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 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 29, 2009
I want to make a website and for the navigation when you click a button, I want the window that is open to fade out and than have the window open that you just clicked on fade in (using flash cs4)
View 21 Replies
Nov 22, 2010
Adobe Flash CS4 - ActionScript 2 Right now I have a button with a Up and Over frame. I already found a way to do this task but it gave me some problems so I want to find a more elegant way:I double clicked my button and clicked on either frame and added this code:
Code:
on (release){ getURL("javascript:LightboxDelegate('imgs/Lizart_1_x768.jpg','Scape oil 60x76cm / 24x30 inch')"); }
but it does not work. Where do I have to put this code in order to work?
View 4 Replies
Mar 23, 2010
in actionscript, is there a way to open CD ROM Drive when you click a button?
View 2 Replies
Jan 17, 2012
I have a tab navigator which contains the 4 tabs Account, Configuration, System and Dashboard. In the Configuration tab there is a button labeled add new config. If the user clicks this button the system tab should open - how to do this?
View 1 Replies
May 12, 2011
I have an AIR application with 2-3 DropDownLists and a bunch of other controls. The DropDownLists are bound to dataproviders (ArrayCollections) in a central Model singleton. On launch, they all work fine.
However, when I click a button to add new objects to an object in another ArrayCollection in the same Model, the DropDownLists get weird. They still register clicks, and all other controls still work as before, but the dropdowns won't open. Clicking/waiting enough usually opens the dropdown, but if I don't make another selection it still won't open after closing. Making a different selection makes that DropDownList work again, but the others might still refuse to open.
If I open the dropdowns using Ctrl + Down arrow, they work all the time, so it's only the click that doesn't trigger the open correctly. I can work around the problem by calling openDropDown() on the dropdown when clicked, but that doesn't feel right.
I'm using the 4.1 SDK, and the dropdowns are s:DropDownLists. I tried using mx:ComboBoxes instead, but got the same behavior. Edit: Weirdly enough, using s:ComboBoxes they work as they should, but I really don't want to use them since they seemingly can't be made non-editable.
View 2 Replies
Nov 23, 2010
I have a video (AS2 swf) that navigates to a preset web page after it reaches "stop", but I can't figure out how to play the swf file from another web page. Help needed with HTML (or other usueable script) for the following task:
1. Click on a graphic image on web page which will then
2. Play the swf file located on a different web site with Flash Player
View 1 Replies
Jul 16, 2005
having a button open two URLs from one click? How would I modify this to make it work?
[Code]...
View 2 Replies
Sep 18, 2003
This is the code I have....
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.enarde.com/popups/3D/3DRed.htm','newWin1','width=511,height=448,left=0, top=0,toolbar=No,location=No,scrollbars=No,status= Yes,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
Everything works, its fine...in my flash movie you would click on a icon to see the pic in a new window...okay that works...but i want the user to be able to click on another pic and have the last window they open resize to the size of the pic...Its not doing that...it does open the pic in the same window but not resized...it stays the same size as the first pic they clicked on...what i have done was for every pic i would change newWin1 to newWin2 and so on...but that just opens it in another window.So is there a way that i can make it so when i click on a pic it resizes the first window that was open?
View 2 Replies
Jul 12, 2010
Is this possible? Do I have to use JavaScript? 1) If I have 20 html links on a site, what if I wanted each link to open up a new SWF movie? 2) If 1 is possible, could I then go further and not just open an SWF, but open it and issue a command?
View 3 Replies
Apr 22, 2010
i have some code that looks like this
function main9Click(event:MouseEvent):void {
var main9URL:URLRequest = new URLRequest("N:ICTNationalsUnit 2PagesCars");
navigateToURL(main9URL, "_self");[code]....
I need to make it open so when you click on that button it opens the file
View 1 Replies
Aug 19, 2010
how to make lightbox window open from flash. I just want to click a button to open a lightbox window.
View 1 Replies
May 5, 2003
Is anyone know how to write the actionscript to open the notepad and calculator when click on the button?
View 12 Replies
May 25, 2010
iam using a template, i designed everything alright but need to know how to click a thumbnail to open a file in the root directory.The XML file for the thumbnails looks like this currently and everything in the flash movie work and the explorer window opens to he link:
<?xml version="1.0" encoding="utf-8"?>
<thumbnails>
<thumbnail filename="ms.jpg" url="http://www.myspace.com/XXXX" [code]...
but instead of a URL I want a file to be opened (a mp3 or wmv or swf or exe) in its own window or default player...What is the code i would use? A similar flash template would be this http:[url]....but when you click each of the thumbnails, i want 1 to open a mp3, one ar flash movie etc
View 1 Replies
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
Aug 13, 2006
I know how to make a custom right-click menu with a series of options, but how would I make a menu with sub-options (like the quality option on the default right click menu).
View 2 Replies
Jan 22, 2010
I just started out using autoscript 3.0. What I want is that when I click a button (with an image inside) it opens a new window with an enlargement of that image. I've already done the following:
1. Create new button
2. Set it's instance nam to appinvent_btn
3. Created new action layer.
4. Set up the following script in actionscript 3.0
appinvent_btn.addEventListener(MouseEvent.MOUSE_DO WN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("???????????????????????????"));
}
View 1 Replies