A couple of weeks ago I was looking for some more examples of using the measure() method in one of my custom Flex components and I found this series of excellent tutorials of how to create a custom component by Peter Ent:

  • Component Class - Part One
  • Component Class - Part Two
  • Component Class - Part Three
  • Component Class - Part Four
  • Component Class - Part Five(Skins vs Styles) </ul>

    This series takes you through creating a custom component in Flex with actionscript and he takes you through all the possible options (from extending an existing component from the Flex framework to starting with a clean slate by extending the <a href=”http://livedocs.macromedia.com/flex/201/langref/mx/core/UIComponent.html>UIComponent</a>.)

    As I’m still fairly new to Flex reading this exposed some new areas of Flex components to me, such as the commitProperties() and invalidateProperties() methods and also gave me more insight into the updateDisplayList() method.

    This weekend I have been getting dirty at a low level with Flex creating some really customised components (and my first programmatic skins - which are really great to use once you get one under your belt) for a personal project and if I hadn’t have read this series it wouldn’t have half as easy as it has been.