Daily Archives: December 14, 2006

Flex 2 RolloverImage component

I have created a very basic Flex 2 RolloverImage component that allows you to define the up, over, and down images through CSS.
Here is the guts of how to use the class:

<mx:Style>
  .firstRollover {
    upSkin: Embed(source="/assets/arrowGreenUp.png");
    overSkin: Embed(source="/assets/arrowBlueUp.png");
    downSkin: Embed(source="/assets/arrowBlueDown.png");
  }
</mx:Style>
<renaun:RolloverImage
    styleName="firstRollover"
    click="mx.controls.Alert.show( 'click' );" />
<renaun:RolloverImage
    upSkin="@Embed(source='/assets/arrowBlueUp.png')"
  [...]