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:

PLAIN TEXT

XML:

  1. <mx:Style>

  2.   .firstRollover {

  3.     upSkin: Embed(source=”/assets/arrowGreenUp.png”);

  4.     overSkin: Embed(source=”/assets/arrowBlueUp.png”);

  5.     downSkin: Embed(source=”/assets/arrowBlueDown.png”);

  6.   }

  7. </mx:Style>

  8. <renaun:RolloverImage

  9.     styleName=“firstRollover”

  10.     click=“mx.controls.Alert.show( ‘click’ );” />

  11. <renaun:RolloverImage

  12.     upSkin=“@Embed(source=’/assets/arrowBlueUp.png’)”

  13.     overSkin=“@Embed(source=’/assets/arrowBlueDown.png’)”

  14.     downSkin=“@Embed(source=’/assets/arrowGreenUp.png’)”

  15.     mouseDown=“mx.controls.Alert.show( ‘mouseDown’ );” />

For a live example click here
, the source is available by right clicking on the component or you can find it here.

Leave a Reply