Action Script


18
May 09

ObjectUtil.copy is not working as you are expected

Couple of minutes back when I tried to deep copy my object its just returning me null.
when I tried to assign it for a object its working.
I gone through the implementation its simple and effective…

public static function copy(value:Object):Object
{
var buffer:ByteArray = new ByteArray();
buffer.writeObject(value);
buffer.position = 0;
var result:Object = buffer.readObject();
return result;
}

Then why its not working… reason is simple :)
Copies the specified Object and returns a reference to the copy. The copy is made using a native serialization technique. Confused.

Use the [RemoteClass] metadata tag to register the class with Flex so that Flex preserves type information when a class instance is serialized by using Action Message Format (AMF).
We have two ways to add the type information to the class:
1 . using [RemoteClass]
2. registerClassAlias(“my.pkg.class”,class);

This will resolve the problem.


23
Jan 09

Flex Explorers that I found while googling

Flex Styles Creator
Derek Wischusen: Flexonrails.net
Derek did some great work adding server-side css-file creation functionality to the Style Explorer. Derek contributed code to the Adobe Consulting Style Explorer in the form of “Export All CSS” functionality, but if you’re looking to create a new CSS file, rather than just copy-and-paste the CSS, check the Flex 2: Styles Creator out.

Flex Filter Explorer
Joe Johnston: Merhl.com

Joe modifies the Flex Style Explorer to create a Filter Explorer. Alter Flex filter properties and generate the appropriate MXML code to create the filter. Awesome!

Flex 2.0 Primitive Explorer
Jason Hawryluk: Flexibleexperiments.wordpress.com
Jason starts with the Style Explorer UI, and creates a great application for exploring and creating code for drawing primitive objects in Flex. If ever there’s a use case for needing to visualize code, and to be able to graphically manipulate something, it would be this use case. Great job Jason.

Flex Transitions and Effects Explorer
David Keutgens: blog.keutgens.de

David takes inspiration from the Flex Style Explorer and creates his own Flex Effects Explorer.

Flex Regular Experssion Explorer
Ryan Swanson: blog.ryanswanson.com

Ryan Swanson takes inspiration from the above explorers and built the excellent utility for the people who are working Regular Expression in Flex or Action Script and made our life easy.