Simple Flex Example

November 08, 2005
web

Here's an even simpler flex example that I showed in my Flex presentation today. It uses a horizontal slider component to change the alpha transparency of an image.

<?xml version="1.0" ?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
	<mx:HSlider id="slider" minimum="0" maximum="100" snapInterval="10" change="{img.alpha=slider.value}" />
	<mx:Image source="https://www.petefreitag.com/images/blog/kayaks.jpg" id="img" alpha="0" />
</mx:Application>

Like this? Follow me ↯


You might also like:

42 people found this page useful, what do you think?

Comments

Dude, I copy and paste the code to the source but the opactiy only limited to 0% and 100%, there's no transparency in the image
And, you need to set enabled="true" in the HSlider
please keeps send me the daily


Foundeo Inc.