
October 19th, 2008

Posted in
Design Patterns
Do you still remember the factory method pattern we talked about last time? If you’re already forgot it. May be you can take a look at the following intent, which was defined by the GOF book.
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
— By THE GOF BOOK

October 13th, 2008

Posted in
Flex
I created a Grid to layout my component. I set the borderthickness to 1 pixel in order to get a 1-pixel-border Grid. However, the border looks more thick than my expectation. The borders are 2 pixel wide except the borders around the Grid.

October 8th, 2008

Posted in
Design Patterns
In our last topic, we talk about the strategy pattern. And it helps us to encapsulate the change of algorithm. Today, we go on talking about the birds. We will consider how to generate the birds, eh, I mean the classes.
Now, we have the classes of eagle and penguin. We can use them anywhere we want. Further more, we can write down the following code to decide which class should be initialized.

October 7th, 2008

Posted in
Flex
To the developer who has long time experience of Java, the first time to use ActionScript maybe will consider how simple the ActionScript is. And someone maybe can’t help to do comparison. The following article is discussed the block scoping is not supported in ActionScript by simple code. If you have interesting please read it.

October 7th, 2008

Posted in
Design Patterns
Today, we’re going to talk about the design patterns in ActionScript. You may be familiar with those patterns if you’re familiar with OO(object oriented). But I won’t suppose you have much knowledge about it, all you need to know is just some basic OO principles, such as encapsulation, inheritance and polymorphism.

October 6th, 2008

Posted in
as3Corelib
This class provides encoding and decoding of the JSON format. This demo shows how to encode an object to a JSON-formate string and how to decode a JSON-formate string to an object. It’s really simple with this class provided by as3corelib library.

October 2nd, 2008

Posted in
Flex
If you are an experienced Java development, you might know the ICODecoder class ( package com.sun.jimi.core.decoder.ico ). Using this class, We can read ICO file in Java. But how can we do the same in actionScript? The following ICODecoder Class is capable of reading the ICO format in actionscript. Usage is very simple:

October 1st, 2008

Posted in
Flex
The flash.display.Bitmap class represents display objects that represent bitmap images. These can be images that you load with the flash.display.Loader class, or they can be images that you create with the Bitmap() constructor. Similar to Bitmap class, BMP files decoder class BMPDecoder read bmp file and display (written by munegon), RLE compression be supported. The usage is very simple: