Sharing the Code

Programming stuff that might be useful to others

Tag: Client-side

Custom Item Renderer in Flex

The documentation isn’t very good on how to create custom item renderers for things like data grids. Below is an example of a ‘blank’ one. You extend Canvas and implement IDropInListItemRenderer and update it’s appearence in the ‘data’ setter. Remeber to reset the visual state each time e.g. remove all children, since item renderers are reused in difference places of the parent component.

Read more

Compiling Flash files in Ant

If you have FDT (an actionscript Eclipse plugin) you can compile your FLAs using Ant. But you first need to set the location of Flash in FDT settings by going to Window > Preferences > FDT > Tools > Flash in Eclipse and entering the location of flash.exe in the Flash IDE text box (it will probably be something like C:\Program Files\Adobe\Adobe Flash CS3\Flash.exe). This will compile the FLAs in Flash – it would probably be faster if it used a command-line compiler like the one that comes with the Flex SDK but I haven’t looked into integrating this yet.

Read more