Flex :: Events - Determine Which Button Was Clicked In Dialog

Feb 26, 2012

I am using browseForSave() to give the user a chance to save a file before navigating back to a previous screen. As of now the cancel button on the save dialog just closes the save dialog. I want to see if the cancel button was clicked, and if so continue navigating back to the previous screen without saving. Right now the person has to save the file in order to move back. Below is the code I'm using.

[Code]...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Determine Which Button Is Clicked?

Aug 2, 2006

I would like the submenu to become black when clicked and so on. Here's some code (if you have the time the whole thing is included as an attachment). Greetings from Sweden.

Code:
function createSubMenu(num, nypos) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;

[Code]....

View 2 Replies

ActionScript 3.0 :: Function To Determine Which Button Is Being Clicked?

Oct 19, 2010

I'm writing an app where I want to know which, of an unspecified set of buttons, the user is clicking.The actual location of buttons determined by previous user actions, so I cant use information like mouseX.You can see from the code the way I'm attacking this - trying to access the button based on its position in the display list of a container. Unfortunately this has always led to type coercion errors 0 - AS can't see that e.target is a DisplayObject.se has solved this problem.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;

[code].....

View 2 Replies

Flex :: Determine Which Path Element Clicked In FXG File?

Oct 17, 2011

I am working on a sample map application using Flex 4/fxg? Now I have got FXG paths held in Group elements with id's( I have assigned path's id's to the corresponding group container)? But when I click anywhere in the map, I do not get the clicked group as target/currentTarget in event handler. How to determine which element is clicked?

[Code]...

View 1 Replies

ActionScript 3.0 :: Button That Play Sound When Clicked And Be Controlled With Events?

Nov 8, 2011

I'm a flash beginner and I've been having alot of trouble figuring out how to make a button which can be controlled with the keyboard as well as the mouse and plays a sound when clicked but when the button is released the sound instantly stops. What I'm going for is a piano application, I made the button, I know how to create keyboard events with listeners and make the different button states up and down but I don't know how to control the button with the keyboard and play sound when the button is clicked but stop the sound when the button is released.

Also I'd like to have it where the space bar will cancel whatever makes the sound stop so it just rings out until the sound clip ends. Can someone explain to me how to do this, remember I'm a beginner so please explain everything.

View 6 Replies

ActionScript 3.0 :: Determine Which One Has Been Clicked

Oct 7, 2009

i am trying to make a photo gallery so when people click on a thumbnail it expands to full screen, my problem is i have lots of pictures and i want to determine which one has been clicked. i thought i would use the e.target in a simple if statement like this:

[Code].....

in this picture one and two are both on the stage with instance names of picture and picture2.

View 3 Replies

Flex :: Determine The Button Up Event?

Feb 20, 2009

There is event in spark Button - buttonDown. But how to determine the button up event?

View 1 Replies

ActionScript 3.0 :: Determine If Text Was Clicked In TextField?

Jul 15, 2009

I have a TextField, containing some characters. The TextField is bigger though and containes some empty space. Now I need to determine if on a mouse click on this TextField, the user hit the text or if he hits the empty space.

View 4 Replies

ActionScript 2.0 :: Forloop - Determine Which Thumb Was Clicked?

Jun 18, 2008

i basically have a gallery with thumbs loaded in via xml. and then a currentThumb.onRollover function depending on which thumb was clicked. Now this is all within the forloop function on frame1. what if I want the actions to occur on frame 2 of the main timeline after the coinciding thumb has been clicked. How can I determine which thumb was clicked? I tried using a _global.id = i; but that doesnt store the correct value from the loop.

View 8 Replies

Flex :: How To Determine Which Button Is In MouseOver Event

Mar 6, 2010

Ref: spark.components.ButtonBar. In the spark ButtonBar's mouseOver event, how do you determine which of the several buttons the mouse is hovering over? There is, of course, no selected index at this juncture. If it makes a difference, my ButtonBar is not defined in MXML but is instantiated in ActionScript and an ArrayList is assigned to the dataProvider property of my ButtonBar instance.

View 2 Replies

Actionscript 3 :: Determine The Index Of An Element In Array That Has Been Clicked?

Jan 3, 2012

Say, I have an array of movie clips (dummies). Each dummy has an event listener and reacts to clicks. And when a dummy is clicked, I want to know the index of the clicked dummy.

I've only come up with this solution: run through the whole array of dummies and find out which dummy is the target, then exit the 'for' cycle and assign some global variable the value of counter variable, but this way the application I am building will demontsrate poor performance.

View 2 Replies

Actionscript 3 :: Determine The Index Of An Element In Array That Has Been Clicked?

Sep 2, 2004

I have an array of movie clips (dummies). Each dummy has an event listener and reacts to clicks. And when a dummy is clicked, I want to know the index of the clicked dummy.I've only come up with this solution: run through the whole array of dummies and find out which dummy is the target, then exit the 'for' cycle and assign some global variable the value of counter variable, but this way the application I am building will demontsrate poor performance.

View 12 Replies

Actionscript 3 :: Flex 3: Determine If A Generic Object Is Actually A Button?

Aug 7, 2009

I have this bit of code, and it's not working as I expected. btnContainer is a VBox that contains a ton of buttons (toggle=true); and I want to reset them to un-toggled at a certain point.

for (var btn:Object in btnContainer.getChildren()){
if (btn.isPrototypeOf(mx.controls.Button)){
btn.selected = false;
}
}

With the above code, "btn" shows up as just the index during each iteration of the loop (0,1,2,3,...), and the conditional never evaluates to true.I also tried this:

for (var btn:Button in btnContainer.getChildren()){
btn.selected = false;
}

This works fine, except that there is also a label inside btnContainer; so it throws an error when trying to cast the label as a button.

View 2 Replies

Actionscript 3 :: Determine The Sequence Of Events?

Dec 1, 2011

I am using flex-4-tree [URL] in a mobile phone AIR app.

The Tree CLass:

public class Tree extends List
{
...
dataSource.addEventListener(TreeEvent.NODE_EXPANDED, nodeExpandedHandler);
dataSource.addEventListener(TreeEvent.NODE_COLLAPSED, nodeCollapsedHandler);
...
}

There is a menu on the main screen of the app. If the user selects a menu-item, the appropriate action is taken, but if the user expands/collapses a menu-item by selecting the expander icon, the menu-item is expanded/collapsed.

Currently the List change Event is received before the flex-4-tree Expand/Collapse Events.

I need to receive the flex-4-tree Expand/Collapse Events before the List change Event.

View 1 Replies

ActionScript 3.0 :: Alert Flash To Determine Which Movie Clip On The Stage Is Clicked?

Apr 13, 2011

I have a group of movie clips, each placed randomly on the stage. I want to be able to click one of the movie clips and move them around. They are stored in an array.

View 5 Replies

Flex :: Know That Which Button Is Clicked?

Dec 10, 2009

for (iss = 0; iss < listOfProductIds2.length; iss++)
{
// Alert.show(listOfProductIds2[iss]);

[code].....

View 4 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

Sep 29, 2008

How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?

[Code]...

View 7 Replies

Flex :: Know When A Button In DataGrid ItemRenderer Is Clicked?

Jul 8, 2009

I have a DataGrid component that displays a few columns of data. It has one additional column that displays a Button that allows the user to take an action with regard to the record. [code]...

View 2 Replies

Flex :: Edit Selected Row When A Button Is Clicked?

Jan 13, 2010

I have a very simple DataGrid with 2 columns, some thing like this[code]...

What Im trying to do is to activate the edition of the selected row when the user clicks a button. So far I've been unable to find any example of how to do this. I already tried 6 or 7 different approaches but non works.

How do you get the selected row (NOT selectedItem) of a DataGrid and how can you:

Change the ItemRenderEditor or ItemRenderer on the fly of just that row.

Or enable the edition of that specific row without clicking it.

View 1 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

ActionScript 2.0 :: Buttons To Stay Orange Once Clicked And Only Roll Out Back To Grey When The User Has Clicked On Another Button In The List

Feb 7, 2007

I've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?

View 2 Replies

Actionscript 3 :: Flex Tooltip Disappears When Button Is Clicked

Jul 28, 2011

I have tooltips in flex but when a component is clicked the tooltip disappears and the user has to move mouse out of the control and then back into the control to display the tooltip.
Is there a way to prevent the tooltip from getting destroyed on mouse click. I tried calling e.stopImmediatePropagation(); e.preventDefault(); on mouse click event of button. also tried handling and preventing tooltipEnd and tooltipHide events but they are not fire when the button is clicked.

View 1 Replies

Actionscript :: Flex: Selecting A Row A Clicked Button Itemrenderer Resides Within?

Apr 3, 2011

Inside a datagrid, I essentially want to create a "download button" itemrenderer to the right of the name of a downloadable object, resulting in something like the following link: [URL]

The download function operates upon the currently selected row and is called when one of the download buttons is clicked. Therefore, I am wondering if anybody knows of a way to select the row the itemrenderer button is contained within as the active row when one of the download buttons is clicked.

View 1 Replies

Actionscript 3 :: Flex TextArea Keep Focus/selection When A Button Is Clicked?

May 29, 2009

I am wondering how I would keep the focus/selection on a TextArea even when a button outside is clicked. Like how the RichTextEditor does it.

View 3 Replies

ActionScript 2.0 :: If Statement - Check If Another Button Is Visible On Release Of A Button To Determine What Action To Be Taken

Jun 24, 2004

i'm trying to use if statements but can't get this thing to work i want to check if another button is visible on release of a button to determine what action to be taken.the 'gotoAndPlay("firstscene",1)' is just there as an outcome, will be changed later. anyway this is the code i've got on the button i'm pressing. blobyellow2 is an instance of a button blobyellow is it because it's an instance that it's not working?

[Code]...

edit: sorry forgot to put what's wrong with the code. it acts as though the statement is correct no matter if it is or isn't.

View 11 Replies

ActionScript 3.0 :: Display Dialog Box After Clicking On Button?

Dec 25, 2011

Is it possible to display Dialog Box after clicking on Button in flex 4 and above version?

View 1 Replies

ActionScript 2.0 :: Nav Button States - Button To Stay In It's Active State Until Another Button Is Clicked

Dec 17, 2004

I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:

[Code]...

View 2 Replies

Flex :: Flex Save File Dialog For URL

Oct 15, 2011

I will have a list of links to PDF documents in my Flex web app.What I want to do is that upon clicking some button, open SAVE AS dialog for some pdf from the URL list and download it to disk.What I want to avoid is viewing PDF in browser.ALL I know is that flash.net.FileReference will take raw data but no links.

View 1 Replies

Flex :: Air - Dialog Not Display Immediately?

Sep 11, 2009

In an AIR application I have the following code:

theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
theDialog.addEventListener(FlexEvent.CREATION_COMPLETE, cpuIntensiveCalc);

At the end of cpuIntensiveCalc the dialog is removed. The dialog informs the user that "something is going on, please stand by."

The problem is that cpuIntensiveCalc starts before the dialog draws. So the user experience is that the application freezes for 10 seconds with no indicator, then the modal dialog flashes quickly (less than a second) on screen.

The Adobe docs say this about creation_complete

Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing.

So this feels like the correct event. In the name of completeness, I also tried

theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
cpuIntensiveCalc();

View 3 Replies

Flex :: Back PopUp (Dialog) With A Model

Mar 9, 2010

I'm using MATE on an Adobe Flex project for MVC. On one of our pages, we have a dialog window that is presented to the user that displays them information that comes from RPC. The pages where this dialog pops up is unrelated to the data being displayed so this is a separate model. How do I create a MATE mapping file that will create the dialog window, make it visible to the user, and then inject in data from a model?

View 1 Replies







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