Pete Freitag Pete Freitag

Simple Flex Example

Published on November 08, 2005
By Pete Freitag
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>


flex mxml

Simple Flex Example was first published on November 08, 2005.

If you like reading about flex, or mxml then you might also like:

Discuss / Follow me on Twitter ↯

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
by Rocky on 09/04/2007 at 1:56:09 AM UTC
And, you need to set enabled="true" in the HSlider
by TomasDev on 02/26/2008 at 10:54:48 AM UTC
please keeps send me the daily
by Sagar on 12/16/2010 at 8:08:52 AM UTC