flex

How can I change the size of icons in the Tree control in Flex?

I embed SVG graphics in my Flex application using package MyUI { public class Assets { [Embed(source="/assets/pic.svg"] [Bindable] public static var svgPic:Class; } } and then extending the Tree class with some of my own code, setting the icon upon adding a node to the data provider: public class M...

Flex4 (codename Gumbo) SWF Filesize Speculations

I've heard that the components in the upcoming Flex 4 framework will be more loosely coupled possibly allowing for smaller filesizes for projects that use relatively few components. It this true? Or will the entire Flex framework still get bundled into each SWF that uses a single Flex 4 component? If it is true, and we could compile fai...

Flex - ActionScript: how do I use SortField to sort my data numericly

From the documentation: SortField () constructor public function SortField(name:String = null, caseInsensitive:Boolean = false, descending:Boolean = false, numeric:Object = null) I'm confused on the last part - numeric:Object = null Here is my function: private function createXMLDataProvider():XMLListCollection{ var sort...

Can you create custom events on non-UIComponent based objects in Flex 3?

I have a simple object that get's geocoding data from the Google Maps API and I'd like it to dispatch a set of custom events depending on the response from Google. However, I don't have the addEventListener() and dispatchEvent() methods on this class because it doesn't extend UIComponent. Is there a way to create custom events in Flex ...

Adobe Flex control missing vertical scroll bar

I have a canvas containing a datagrid. I set horz and vert scroll to 'off' for the canvas, and set both to 'auto' for the DG. This works until I have a larger number of columns in the DG (>=16), then the vert scroll bar doesn't appear. Anyone seen this and, better yet, have an answer? TIA, Perflexed ...

Where can I find a good treeview control for Flex that supports checkboxes?

To my best knowledge the out-of-the-box Flex 3 treeview control does not support checkboxes. Where can I find a good treeview control that supports checkboxes on any and all nodes. I would prefer open source software but commercial components are not out of the question. ...

Can I bind a Flex component property to a function?

I want to set the enabled property on a button based on the return value of a function that has one or more parameters. How can I do this? private function isUserAllowed (userName:Boolean):Boolean { if (userName == 'Tom') return true; if (userName == 'Bill') return false; } <mx:Button label="Create PO" id="createPOBut...

remote Object request image change

I am using flex with BlazeDS to connect a J2EE AppServer. Can I place any Global Image in any global position that would change automatically whenever any remote object is called and the image would be set as default whenever the response comes back from the server.. ...

Flex and AIR passing data between each other

I’m looking for some samples/tutorials/general pointers in doing either of the following. 1) Create an AIR app that can load a live flex app and use that for testing. So we have a app which is live and if I could load that into a AIR app which can edit a config file and then test that config file using the live swf but inside the A...

How to submit multiple models on rails using flex?

I am trying to submit a create and update request to rails using flex with multiple models. For example, imagine that we have a blog post and multiple comments. The user comes and update the post and some comments, when he clicks on submit I want to send all updates. If I send something like: var params:Object = new Object(); params[...

In Flex, how do I know when the properties of a dynamic object change?

I have a dynamic class that serves as a storage container for configuration settings. The settings are variables of that class and it has methods to read from and write to a configuration file, database etc. Now I want to trigger writing to the persistant storage whenever a class variable is changed. As the variables are added dynamicall...

Weird ItemRenderer behavior

I have a really odd issue with an ItemRenderer. I have a main.mxml container with a ViewStack. When a user logs in, the initial view contains an AdvancedDataGrid--containing some data and the ItemRenderer below--which simply displays a Delete button. When the user logs in, this AdvancedDataGrid is automatically refreshed from the databas...

From Java Application to Flex Application

Has anyone had experience taking a full-fledged Java desktop application and replicating the functionality using Flex? If you have, what are some of the biggest things to watch out for or pay attention to? What are some recommendations you can make based on your experience? ...

How can I test a SWF URL before Loading Styles From if (or catching the error)?

I am trying to use the following code to load styles from an external SWF, but I keep getting an ActionScript error when the URL is invalid: Error: Unable to load style(Error #2036: Load Never Completed. URL: http://localhost/css/styles.swf): ../css/styles.swf. at <anonymous>()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\sty...

Performing XML Transformations in Flex

I'd like to be able to run an xml transformation using an xslt file in my AIR project. What's the best way to accomplish this? ...

Play video from local file using Adobe AIR

I'd like to play videos, as well as display images and possibly other flash content using adobe air, and reading from the local file system. I've been searching APIs and I have not yet been able to connect the dots. I know of flash.filesystem.File and flash.filesystem.FileStream and have experimented with loading and reading files. I be...

How do I read a Django HTTPResponse in Flex?

I'm a complete Flex noob, so I apologize in advance if I'm missing something obvious. I wrote a fairly simple file uploader in Flex, which calls my Django back-end via URLRequest (the FileReference object handles the upload). My upload works as intended and I have Django return a HTTPResponse object. As such, I'd like to read the cont...

AS3 - How to do a synchronous load of an asynchronous call?

I have a function that loads a user object from a web service asynchronously. I wrap this function call in another function and make it synchronous. For example: private function getUser():User{ var newUser:User; var f:UserFactory = new UserFactory(); f.GetCurrent(function(u:User):void{ ...

remoteObject Fails After Recompiling Using CF8

I've been handed a Flex project that was originally built and compiled using Flex3 and CF7. My setup is Flex3 with CF8. Everything works fine when I initially pull the project over but as soon as I recompile, remote calls to the CFCs begin to fail. I used Charles Web Proxy debugger and discovered that the failure appears to begin with...

What is the best way to associate an Event with a Class in ActionScript / Flex 3?

ActionScript 3 / Flex 3 - Adding custom events to a class Say I have the following Event: import flash.events.Event; public class SomeEvent extends Event { public static const EVENT_ACTION:String = "eventAction"; public function SomeEvent(type:String) { super(type); } override public function clone():Event { ...