flex4

Spark: automatically set scroller to the end of a list not working properly

I'm using the following mxml code for displaying a list of some data. I built a custom renderer which can have variable height. Each time a new data arrives, the scroller should go to the end of the list. I registered to the events which triggers an array change. It's working fine if the height of items is the same. But if this is not h...

How can I get the actual service output from an HTTPService fault?

Flex HTTPService faults end up wrapped in a fault object that seems to obscure the actual returned text. Right now, I return a custom 400/409 error response to service clients that contains useful information about the cause of the error, which I'd like to have displayed to that client. How can I, given a fault event, get the actual tex...

How to include resource bundles in ActionScript Modules using Flex 4.1?

In the simplest of Flex Projects, create an MXML Flex Module and then load it using the ModuleManager. No problem. Create an ActionScript class that extends Module and then configure your project to compile that into a Module. Load this new module instead. The project compiles, but crashes when running with the following error: "Err...

Make Flash CS5 publish for Flash Player 10.1

I'm compiling a swf using Flex 4.1 SDK that loads another swf that is created by a designer using Flash CS5. The 4.1 swf throws an error, "VerifyError: Error #1053: Illegal override of removeChildBridge in mx.managers.SystemManagerProxy." A few people around the web have said that they had this same error when their 4.1 swfs were loadi...

Select a Tree item

I'm working on a tree component using a XMLLIST as a data provider. <list> <menuItem label="Home" menuItemId="1" > <menuItem label="Info 1" menuItemId ="4"></menuItem> </menuItem> <menuItem label="Services" menuItemId="2" > </menuItem> <menuItem label="About" menuItemId="3" > </menuItem> </list> ...

Probleme with string encoding in SOAP

Hello, I have an application in Flex3 and when I send an Soap Query, I have a corect enveloppe, but when I try the same code in Flex 4, the sting is encoding : exemple : Flex 3 : <ns1:orderLine> <ns1:line_nr>2</ns1:line_nr> <ns1:productCode>7443</ns1:productCode> <ns1:quantity>20</ns1:quantity> </ns1:orde...

Flex 4 Air 2 RSL (Runtime Shared Libraries)

Hi, Has anyone got any experience will loading SWC / SWZ's at runtime within a Flex 4 / Air 2 desktop application? The very rough idea would be to have a desktop Air app, which is able to "download" additional modules (eg, a SWZ/RSL representing a form) and load these at runtime? Imagine the App is configured using an XML file obtaine...

Updating view spark.components.List

I am using a List component inside an itemRenderer. The main user interaction involves dragging an item from the List in one renderer and dropping it in another. My problem: When the data object is updated I want the Lists' height to be modified according to the number of objects in the dataprovider(dp), which is passed to the List fro...

Flex 4: Can't pre-select item in DataGrid (Array)

I'm polling a RemoteObject every 5 seconds using setInterval and the returned result (Array) is being fed into a DataGrid as the DataProvider. However everytime this happens the selected row deselects when the DataGrid is refreshed. So I want to re-select the item when the DataGrid has been updated. So far I've tried capturing the selec...

Combine 2 dataGrids into one with states

332 <mx:DataGrid id="grid" width="100%" height="100%" sortableColumns="true" itemClick.ordersState="{_selectedOrder=grid.selectedItem.ordersState}" selectable.ordersState="true" includeIn="locationsState, ordersState" > <mx:columns > <mx:DataGridColumn d...

Text direction backward on spark.components.Label on CartesianDataCanvas

For some reason, my text is coming out reversed (mirror image) when I put a Label component on a CartesianDataCanvas (all in actionscript). Explicitly specifying "direction" did not help. I'm wondering if backgroundElements can't handle text? var dataCanvas:CartesianDataCanvas = new CartesianDataCanvas(); cachedB...

[Flex 4] How to get a skin width and height from it's hostcomponent?

[Flex 4] How to get a skin width and height from it's hostcomponent? ...

Scrolling 2 lists with 1 scroller Flex 4

Been trying to scroll 2 lists with their native scrollers disabled with 1 scroller added to the right of them. I tried setting the viewport of each List as the scroller and while that works it just instantiates the scroller to each of the Lists rather than use 1. Essentially i'm trying to have them scroll vertically at the same time wh...

How to handle D-n-D to a Sprite?

Hi, I need to detect when a user Drag-n-Drop an object into a sprite. Here's a sample app that illustrates the issue. It never gets to the alert: tks. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com...

How to set an event listener for mx:image to kick in after image loads

Is there a way to dispatch an event after Flex loads an mx:image? I'm loading image externally and don't know the width/height until it's loaded. I get an exception when I call width/height to the image before loading. ...

Shifting Flex 3.5 project to flex 4.0 - styles warnings

I am shifting my project from Flex 3.5 platform to Flex 4.0. I am able to remove all compile time errors. All I am left with is approx. 1000 warnings and all are on styles. I have used all mx components as earlier my project was in Flex 3.5. and i cannot change the controls to because it will hamper their look and field. All the style...

How to do Image loading animation?

I am using Flash Build Image control to load the image from outside using .source attribute, I want to add the percentage animation for the loading process of each image, just wondering how can I do that? ...

Data binding from a method in Flex

Hello all, I have the following mxml (Omitted some parts for brevity purpose): <fx:Script> [Bindable] private var _dataSet:IDataSet; public function set dataSet(value:IDataSet) { _dataSet = value; } private function getColorItem(itemName:*):String { if (itemName == "Research") return "#31e5fc"...

Flex 4 DateChooser

Hello. I have an Array of days. I want those days to have a different background-color in the DateChooser component, say red. How can I do that please? ...

Flex networking: How to read multiple AMF Objects

Hi there, I'm trying to write a very plain game client to get some practice with Actionscript 3 and the Flex Framework. I have some problems with following code: private function readResponse():void { var r:ByteArray = new ByteArray(); readBytes(r); while (r.bytesAvailable != 0) { try { var d:Object = r.readO...