I have finally(!) gotten around to releasing Fabricaton 0.6. This release adds a couple of important new features, Interceptors and Reactions.
Sep 19 2008
Using TileList Flex Component in AS3 Class
I’ve been looking for an example for using Flex MediaTile Component in AS3 class. I really couldn’t find any. So, posting an example code snippet to show how to use it within an AS3 class:
private function draw( ):void
{
var mediaTile:TileList = new TileList( );
var mediaCollection:ArrayCollection = new ArrayCollection( );
mediaCollection.addItem( {id:"1", url:"image1 .jpg"} );
mediaCollection.addItem( {id:"2", url:"image2.jpg"} );
mediaTile.dataProvider = mediaCollection;
mediaTile.itemRenderer = createItemRenderer( );
}
private function createItemRenderer():ClassFactory
{
var temp:ClassFactory = new ClassFactory();
temp.generator = MediaThumbnail; //MXML class to use as a tile
return temp;
}
MediaThumbnail.mxml:
