Archive for December 14th, 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:

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.

3 comments December 14th, 2006



Disclaimer: I work as a Flash/Flex Developer for Adobe Systems Incorporated. The opinions expressed here represent my own and not those of my employer.

My Amazon.com Wish List

Calendar

December 2006
S M T W T F S
« Nov   Jan »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Posts by Month

Posts by Category


Flex.org - The Directory for Flex