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:
XML:
-
<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')"
-
overSkin="@Embed(source='/assets/arrowBlueDown.png')"
-
downSkin="@Embed(source='/assets/arrowGreenUp.png')"
-
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.
3 comments December 14th, 2006




