Archive for August, 2008

31
Aug

Validating negative numbers using the NumberValidator in Flex

The following example shows how you can prevent or allow negative numbers when using the NumberValidator class by setting the Boolean allowNegative property.

Full code after the jump.

Continue reading ‘Validating negative numbers using the NumberValidator in Flex’

30
Aug

Validating integers using the NumberValidator class

The following example shows how you can validate a number as an integer or real (floating point) number by setting the domain property on a NumberValidator instance.

Full code after the jump.

Continue reading ‘Validating integers using the NumberValidator class’

29
Aug

Validating email addresses using the EmailValidator class in Flex

The following example shows you how you can validate email addresses in a Flex application using the EmailValidator class and the validate() and static EmailValidator.validateEmail() methods.

Full code after the jump.

Continue reading ‘Validating email addresses using the EmailValidator class in Flex’

28
Aug

Creating a component instance by class name in ActionScript 3.0

The following example shows how you can create a new Flex component instance by using its class name by calling the getDefintionByName() method.

Full code after the jump.

Continue reading ‘Creating a component instance by class name in ActionScript 3.0′

28
Aug

Parsing XML nodes and Objects with dashes in their names in ActionScript 3.0

The following example shows how you can parse an XML node with a dash in its node name (<font-family />) as well as parsing an Object with a dash in it’s identifier using the square bracket notation ([]).

Full code after the jump.

Continue reading ‘Parsing XML nodes and Objects with dashes in their names in ActionScript 3.0′

28
Aug

Setting a background image on a VideoDisplay control in Flex

The following example shows how you can specify a background image for a Flex VideoDisplay control by setting the backgroundImage style.

Full code after the jump.

Continue reading ‘Setting a background image on a VideoDisplay control in Flex’

27
Aug

Setting the horizontal scrollbar policy on a DataGrid control in Flex

The following example shows how you can set the horizontal scrollbar policy on a Flex DataGrid control by setting the horizontalScrollPolicy property to one of the constants in the mx.core.ScrollPolicy class.

Full code after the jump.

Continue reading ‘Setting the horizontal scrollbar policy on a DataGrid control in Flex’

27
Aug

Using a clipboard menu in Flex with Flash Player 10

The following example shows how you can set a clipboard menu and specify custom clipboard items on a context menu by setting the contextMenu and clipboardItems properties.

Full code after the jump.

Continue reading ‘Using a clipboard menu in Flex with Flash Player 10′

26
Aug

Setting the vertical scrollbar policy on a TextArea control in Flex

The following example shows how you can set the vertical scrollbar policy on a Flex TextArea control by setting the verticalScrollPolicy property to one of the constants in the mx.core.ScrollPolicy class.

Full code after the jump.

Continue reading ‘Setting the vertical scrollbar policy on a TextArea control in Flex’

26
Aug

Adding a link to context menu in Flash Player 10

The following example shows how you can add a custom link to a context menu in Flex Gumbo and Flash Player 10 by setting the link and contextMenu properties.

Full code after the jump.

Continue reading ‘Adding a link to context menu in Flash Player 10′

26
Aug

Programmatically scrolling a TextArea control in Flex

The following example shows how you can scroll a Flex TextArea control by setting the verticalScrollPosition and maxVerticalScrollPosition properties.

Full code after the jump.

Continue reading ‘Programmatically scrolling a TextArea control in Flex’

25
Aug

Previewing an image before uploading it using the FileReference class in Flash Player 10

The following example shows how you can browse for an image file from your local file system and preview the image before uploading it to a remote webserver by using the FileReference class’s new load() method in Flash Player 10. Once the user has browsed and selected an image from their local machine, you can call the load() method which dispatches a complete event when the image has successfully loaded, at which point you can display the image using a Flex Image control and setting the Image instance’s source property to the FileReference class’s data property (which is a ByteArray).

Full code after the jump.

Continue reading ‘Previewing an image before uploading it using the FileReference class in Flash Player 10′

25
Aug

Saving files locally using the FileReference class’s save() method in Flash Player 10

The following example shows how you can use the FileReference class’s new save() method in Flash Player 10 to save text, XML, and image files to a user’s hard drive.

Full code after the jump.

Continue reading ‘Saving files locally using the FileReference class’s save() method in Flash Player 10′

25
Aug

Creating a FileReference object using MXML in Flex

The following example shows how you can define a FileReference object in MXML by defining a custom namespace for the flash.net package.

Full code after the jump.

Continue reading ‘Creating a FileReference object using MXML in Flex’

25
Aug

Setting the background alpha of the RichTextEditor text area in Flex

In a previous example, Setting the background color of the RichTextEditor text area in Flex, we saw how you could set the background color of the RichTextEditor control’s nested TextArea control by setting the backgroundColor style.

The following example shows how you can set the background alpha of the Flex RichTextEditor control’s nested TextArea control by setting the backgroundAlpha style.

Full code after the jump.

Continue reading ‘Setting the background alpha of the RichTextEditor text area in Flex’




Badge Farm

  • Powered by Redoable 1.2
  • Cornify
  • Feeds burnt by Feedburner
  • Feed