flex

How to capture Alert Dialog Box Selection?

Within an event handler I have an Alert.show(...) that prompts a user for confirmation. How can I capture the selection of the alert prompt and use it within the event handler. For example: private function mainEvtHandler(event:DynamicEvent):void { var alert:Alert = Alert.show("Are you sure?", "Confirmation", Alert.YES|Alert.NO, this, ...

How to set link colors in a RichEditableText component

I've got some text that includes links that I display in a RichEditableText component. How do I change the color of the links from the default blue? I tried the example posted by Peter deHaan but it doesn't work with SDK 4.1. I found a way to do this in MXML, but the text needs to be localizable which means I load it at runtime based o...

Flex 3 Error #2025 when using removeChild

Hi, I'm getting a Flex ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. This is what I've got: a) I set the variable lastButtonClicked to the last button that was clicked in the main app. private var lastButtonClicked:DisplayObject; private function lastButtonClickedFunction(event:MouseEvent)...

Flex: How do I check what the parent of a DisplayObject is?

Hi, How can I check what the parent of a displayObject is? What is the parent of myObject for example. ...

How to pop up Flex Panel by clicking on a GWT(or GXT) component?

I have a web-application whose UI is implemented in GXT (ext GWT). Now I want to switch to Flex but as the application is so large that I cannot afford to start migrating the whole application at once. So I have decided to migrate slowly. So what I want is to bring up a Flex panel on the click of a GXT's button. Basically the idea is ...

How to implement an Object Pool for Flex Data/Item Renderers

You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool? I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to ...

Erasing components on Canvas

Hello people, The problem is when background of top or below label is changed, the top or below button is erased. <mx:Canvas width="100%" height="100%"> <mx:LinkButton icon="{icon1}" width="25" x="10" y="10"/> <mx:LinkButton icon="{icon2}" width="25" x="10" y="100" /> <s:VGroup width="100%" height="100%" id="lst" ...

How do you synchronize the scale of the y-axis on two charts in Flex

I have two line charts appearing on one page side-by-side in Flex. In each case the x-axis is a date time axis, the y-axis is whatever I get by default. The maximum value shown on the y-axis of each chart (i.e. the y-axis scale) automatically adjusts itself according to the data on the chart. This is good, since I don't know what data w...

flex URLLoader get Location header

hello, I'm sending POST request using URLLoader and URLRequest with XML data. Then API sends response with redirect page(Location header) and i want to get this URL. How do I catch this response? UPD: Event.COMPLETE in debugger: event = flash.events.Event (@6e1edf9) bubbles = false cancelable = false currentTarget = flash.net.UR...

Show hide multiple datagrid columns in flex

I have a scenario in which i want to show hide multiple datagrid columns at the same time based on a user selection. I can write a click handler for the button and hide all columns one by one but I don't want to do that instead I want to group certain columns and in my click handler want to be able to hide the complete group in one go. I...

flex recover space wasted by invisible axis

Hi, I want to show multiple series on a chart. But this would result in multiple axis, to avoid this I am trying to make some axis invisible. Question: When i set the axis renderer's invisible = false, there is a white space that is left behind. Is there any way to avoid this white space from showing up ? <?xml version="1.0" encoding...

flow in the bubble phase of the Event

Hi All, Just want to know regarding the bubble phase of the events with some exp. Can we set the bubble property true or false in run time. Please tell me Thanks iin Advace. ...

flex chart hide a datatip

Hi, We get data from multiple feeds and data may or may not exist for a certain date. So, for points that have no data we send NaN. Question: In the below code , is there a way to not show datatip for those that are null. I have added a datatip function but it does show a small empty square, is it possible to not even show that? <?xm...

Error #2032: Stream Error

We are facing this issue in our URL while accessing the Result from the server on the Flex Application on a WAS Machine. The behavior is a bit varied when we access it on IE6 and IE7(both IEs are having same flash Player version). IE6 doesn’t work at all but IE7 works for some conditions. On Windows machine it is working fine(in IE6 and...

Flex: How to Call a Custom Component's Public Function in the Main App?

Hi, How do I call a custom component's public function from the main app. For example, I've got a timer component, MyTimer. In the main app, I want to call startTimer() or stopTimer(). In the main app, I've got: <visualcomponent:MyTimer /> In the component, I've got: public function startTimer():void { baseTimer = getTimer();...

Flex error when removing child

Have a rather bizarre issue with Flex throwing an error when teh application is running in the background. I use Selenium and SeleniumFlexApi to run various tests against my app. If the browser window is in the foreground or any part of it is visible to teh screen, the test pass as expected. However, if the window is in the background...

Flex : Detecting When Buttons are Invisible

Hi, I've got a few HBoxes with buttons in them. I programmatically make certain buttons invisible. At a certain point, all of the buttons should be invisible. How can I tell when all of the buttons are invisible? What's the easiest way of doing so? Each button's visibility is determined independently of the other buttons. <mx:HBox> ...

Replicate Default Flex 4 style in Flex 3

I was wondering if anyone has run across a style or stylesheet replicating the default Flex 4 style over to Flex 3. I love the cleaner and less blue look of flex 4, but I have to develop an application with flex 3 for compatibility purposes. Thanks! ...

Detect when Flex Spark List's data has changed

I need to detect when a Flex Spark List (spark.components.List) data has changed so that I can programmatically change its scrollbar. I know that List is a an EventDispatcher but it's unclear which event I'd register for. Edit: My List's dataProvider is an ArrayCollection that elements are added too. So the dataProvider is never replace...

Listen to all event types of an EventDispatcher

In Flex, is it possible to listen to all event types of an object that's an IEventDispatcher? addEventListener's first parameter is the type, which is a string. In many cases the documentation is not clear what event type it fires. I'd like to attach a generic listener to inspect the events. ...