Category Archives: ActionScript3

Flex 3 Auto-Resize TextInput Control? How?

Here is a quick solution to add Auto-Size functionality to TextInput control in Flex 3. AutoSizeTextInput.class Usage in MXML: Not sure if this method is perfect! Do let me know if there is any better way to implement this 🙂 … Continue reading

Posted in ActionScript3, AS3, components, Flash, Flash CS3, Flex | 9 Comments

AS3 FlexNativeMenu and dataprovider

Yesterday I faced an issue with FlexNativeMenu (popup menu) and its dataprovider. Looks like, FlexNativeMenu does not recognize the changes made to dataprovider. Situation: I was wanted to disable the menu item based on the Label (clicking which I am … Continue reading

Posted in ActionScript3, AIR, AS3, Flash, Flex | Leave a comment

Flex – Double Click to edit functionality for List Control

When for a list control the property editable is set to true, one can click on the item and rename the label or edit the item if an item editor is set. Here is a work around if you wish … Continue reading

Posted in ActionScript3, AS3, components, Flex | 5 Comments

MXML ActionScript Classes

As you know, all MXML files are converted to ActionScript Classes which are later compiled in SWF file. If you want to view / study these automatically generated classes, you can use Compiler Argument -keep-generated-actionscript in Flex Builder Project. In … Continue reading

Posted in ActionScript3, AS3, Flex, MXML | Tagged , , , | 4 Comments

Flex – Image Navigator Example

Here is a small example of creating an Image Navigator for big images in Flex. The big image is loaded in Canvas and an Image navigator will have a small prototype of this image. A small rectangle in Navigator can … Continue reading

Posted in ActionScript3, AS3, components, Flex | Tagged , , | 28 Comments

ActionScript 3: Using URLLoader to send and load server variables

Here is a very simple example of two way communication with database using Flex and PHP. In this example, we are sending username and password to the PHP file from Flex. PHP file then validates the input and returns the … Continue reading

Posted in ActionScript3, AS3, Database, Flash CS3, Flex, MySql, PHP | 70 Comments

ActionScript 3: Creating custom event handlers using EventDispatcher

Creating custom event handlers in ActionScript 3 is pretty much simple. Here is a simple example which loads an image and fires a custom event named “onImageLoad” as soon as image is loaded. Class imageLoader.as Now in Flash, create a … Continue reading

Posted in ActionScript3, AS3, Flash, Flash CS3 | 35 Comments