Archive for the ‘Flex’ Category

Design Patterns in ActionScript-Final Note

dory-256x256 In this series, we talk about the 23 design patterns. We use some examples to illustrate how and when to use the patterns, but there is still something I’ve to say here.

Why design patterns?


25+ Very Cool Adobe AIR/Flex Applications for Images & Photos

Adobe-Acrobat-Reader-256x256 Adobe Systems Incorporated is based on photo edit software: PhotoShop. ( Didn’t confirm the develop history but feel like this). Adobe has strong power on the photo edit. But many very excellent photo edit applications were developed with the Flex and AIR based on Adobe. I’ve collected some of them like following list. If you know more please don’t hesitate to let me know(Left your comment here :) ). Note: listed in no particular order.


Downloadable Image in Flex–is it possible that images contained in Flex applications are downloadable as they rendered in HTML?

Reading-The-Book-128x128 Problem Summery: Continue the sample posted before A Trick of Using PNGs to Mask Images, When you browse a web page rendered in HTML with fire fox, IE, etc., click the right button of mouse above an image, you will find these commands as below:


Set Background-color for Headers of DataGrid

Marmalade-Cubes-256x256 Problem Summery: One of the BBS developers asked a question about setting the background-color of separate header of DataGrid component. At first, I guessed that the style headerColors of DataGrid would help us. However, this style controls all headers’ background-color. Does headerStyleName of DataGridColumn would help us? Unfortunately, the answer was no. Setting the “background-color” of the style “myDataGridColumnStyle” which I assigned to “headerStyleName” took no effect. No resolution? I googled a lot, found no existing resolution.


as3corelib Tutorial:How to Use URI in Flex

penguin-256x256 IMO, the major usage of this class is parsing a URL to retrieve the information such as host, port, file name, file extension, query, etc. It’s really a convenient way instead of using regular expression to parse the target information.

According to the documentation of as3corelib:


A Trick of Using PNGs to Mask Images

Problem Summery: I want an approach to mask images with given PNGs. However, the inner of some of the PNG images are transparent. After I set the PNG as a mask, the area of the masked image below the inner of the PNG is invisible.


How to Create a Bitmap(Matrix Graphics) Progress Bar in Flex

lime-apple-128x128 Usually we could use percentage or progress bar to show how the progress going on. But some cases such as the file divided into some same size of the block and deal with these blocks. Then using matrix graphics to indicate the progress is very direct-viewing. Following let’s try to do it.

First let’s see the screen shot of the program or run the Demo (switch effect by click)


Design Patterns in ActionScript-Mediator

My-Documents-256x256 Ok, the last pattern now. Let’s take a look the intent directly.

Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.


From this intent, we can get that this pattern is use for encapsulating the interaction of objects.