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>


Related Entries

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

Trackbacks

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
I had to change these values to get the image to fade properly: minimum="0" maximum="1" snapInterval="0.1" It seems the images alpha is on a 0 - 1 scale rather than 0 - 100. Cheers
And, you need to set enabled="true" in the HSlider
change="{img.alpha=slider.value} to this change="{img.alpha=slider.value/100}
hi,

I am new am new to Adobe flex and also i am confused send me link to learn adobe flex that i will implement this asap in my Campus Erp Services

Thanks and Regard's
Bridge Logic System
http://www.bridgelogicsystem.com/erp-application-development.html
Please send me a link for best tutorials for flex

Thanks and Regard's
Bridge Logic System
http://www.bridgelogicsystem.com/
please keeps send me the daily
Honourable bye, considerate soul mate :)

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?