flex

Good way to rename fields in Actionscript array?

Should be easy but google couldn't give me a straight answer. I have an array. The fields in the array have underscores that I would like to remove e.g. "Column_1" to "Column 1". Does anyone know a good way to do this without looping through the whole array and rebuilding it anew? I didn't see any methods in the reference that would ...

How can I extend a Flex component that is not a container (RadioButton, for example)?

I want to extend the RadioButton component in Flex 3, adding a text input line to it in place of the label. Is it possible to do this? Alternately, is it possible to have a container -- such as an HBox -- delegate all properties to an internal component -- such as a RadioButton -- so that I could create a composite component that 'acts...

Adobe Air Local FLV Playback

I'd like to distribute FLV files from my website, however I want a level of DRM control over the files. So far, I've been able to modify the FLV files to contain a 60 character ID at the very front of the file, but I can't figure out how to get AIR to extract the ID and therefore play the file. All I can figure out is using NetStream, bu...

Is swapping the columns and rows of a flex datagrid possible?

I have a 1 row, many column flex datagrid. I would like to turn the dataGrid on its side, so that the column headers become a single column running down and v.v. Is there a way to do that in the DataGrid? Or am I stuck manipulating the data presented to the grid? If so whats your recommendation? The main idea here is I have an objec...

Load xml file in flex before application start/intialises

Hi, I've got a configuration xml file that I need to parse for values before a flex application laods. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initialising this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously ...

How to force a resize from a child to a parent

I have a page-like flex application. In my main application is a holder (a canvas) that displays all the pages. The problem is that the components that are loaded inside the holder are bigger than the holder is when the main application starts. The holder height is set to 100% but still he gets scrollbars when I load a bigger component i...

What algorithms could I use for audio volume level?

Let's say I have a slider that can go between 0 and 1. The SoundTransform.volume also ranges between 0 (silent) and 1 (full volume), but if I use a linear function, let's say SoundTransform.volume = slider.volume, the result is rather not pleasing. I really haven't studied the human ear, but I overheard once that human perception is log...

How can I create a totally dependent SWF from an existing dynamic one?

I manage a website that has ModX and for some reason I just can't get dynamic SWF files to load. This is not normally a problem as I have a Flash menu creator program that makes static SWF files. However, this new one only makes dynamic SWFs (ones that rely on external files and XML). I've tried making a Projector of the file but with th...

Changing order of font managers when compiling via ANT task, not possible?

I've recently had the need to use the managers compiler argument, because the project had an Open Type font embedded, and was generating errors at compilation. Now I need to use the same argument in my ant task, but for some reason it doesn't work. I'm using Flex SDK 3.2. The task looks something like: <mxmlc file="${main....

Dynamically adding variables to a URL using flex

In my Flex application I am able to read the variables using something like /flexapp.html?name=josh with no problems. However, this is because I go into the URL and type in the variables by hand. Is there anyway in the code to dynamically append the variable part "?name=josh" ? For example, like retrieving the url and then adding that...

Flex : Changing the appearance of a disabled checkbox

A disabled checkbox in flex looks very "light" colored, almost invisible. Is it possible to make it look like an enabled checkbox which does not do anything on a click event? ...

Compiling a flex application with services-config.xml, with an unknown context.root

I would like to compile my flex application with a services-config.xml file. However, I am forced to supply a context.root. In my setup, the context root (context path) isn't known until my .war file is named and dropped into the webapps directory. It seems like there has to be a way to do this, but I haven't been able to come up with ...

Flex/ActionScript: Support for localizing numbers and dates?

Does Flex/ActionScript offer support for localizing numbers and dates to a user's particular region? ...

Fundamental binding issue

Hi guys, I just ran into a strange binding problem. In the mini app below, the Flex Label component is updated when 'someText' changes, but my boundSetter won't be called after the first, initial call. In short: Why is the boundSetterForSomeText() function not called, while the label does update? Could anybody please shed some light o...

Flex, Flexunit: How to test that an event is dispatched twice?

I'm testing some event dispatch code in a Flex app, using FlexUnit's addAsync method for testing that events are dispatched. Great so far, I can ensure that at least one event was fired. However, I want to be a bit more detailed; I want to ensure that exactly the set of events I'm expecting are dispatched. Is there a useful test patte...

Looking for HTTP Authentication website examples

Hi, I am looking for a website that requires HTTP authentication, so I can observe the behaviour of typical HTTP authentication dialog boxes. The reason I am looking into this, is that for some reason, on Firefox 3, our Flex app seems to open another HTTP authentication dialog box again, after cancel is clicked. It only seems to happen i...

Hiding/Showing a swf in a div?

Hi. I have a flex app that I want to hide in a div until the user clicks a link or element of some type. I've noticed that embedding the swf in a div with style display:none does not actually hide the swf, so how would I go about accomplishing this? The goal is to have the flex app loading in the background while the user does other thi...

Fit TitleWindow to contents

If I don't specify width and height values for a TitleWindow, it will be resized to fit it's contents when I show it using PopUpManager. But there are moments when some components inside will be resized, like a ComboBox which dataProvider is loaded asynchronously, or another component which was not visible and I'd like to set it's inclu...

How can I check Spring Security for user authentication and get roles from Flex?

I'm using Spring, Spring Security, BlazeDS, Flex and spring-flex. I know that I can call channelSet.login() and channelSet.logout() to hook into Spring Security for authentication. channelSet.authenticated apparently only knows about the current Flex session, as it always starts off as false, until you call channelSet.login(). What I ...

Binding to an specific property of objects in an array

I am using Flex to create a small form. All I have at the moment is a List component, that I want to populate with a list of font names. I am getting the fonts using Font.enumerateFonts(true);. This returns an array of flash.text.Font objects. The Font objects have a fontName property that is a String of that fonts name. My problem is...