Simple Flex Example
November 08, 2005
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="http://www.petefreitag.com/images/blog/kayaks.jpg" id="img" alpha="0" />
</mx:Application>
Related Entries
- Simple Flex Tutorial - November 7, 2005
Trackbacks
Trackback Address: 491/7E41E1789EA45D2F09976FE905536D0E
Comments
On 09/04/2007 at 1:56:09 AM EDT Rocky wrote:
1
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
On 02/19/2008 at 10:30:41 PM EST BlindSide wrote:
2
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
On 02/26/2008 at 10:54:48 AM EST TomasDev wrote:
3
And, you need to set enabled="true" in the HSlider
On 04/21/2008 at 7:22:34 AM EDT Ragscoon wrote:
4
change="{img.alpha=slider.value}
to this
change="{img.alpha=slider.value/100}
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
- FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
minimum="0" maximum="1" snapInterval="0.1"
It seems the images alpha is on a 0 - 1 scale rather than 0 - 100.
Cheers
to this
change="{img.alpha=slider.value/100}



add to del.icio.us



