pf » Simple Flex Example
November 08, 2005
Simple Flex Example
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>
Flex 3 Training Classes - Instructor Led Online Courses
Related Entries
- Simple Flex Tutorial - November 7, 2005
Trackback Address: 491/7E41E1789EA45D2F09976FE905536D0E
Comments
On 09/04/2007 at 1:56:09 AM MDT 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 MST 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 MST TomasDev wrote:
3
And, you need to set enabled="true" in the HSlider
On 04/21/2008 at 7:22:34 AM MDT Ragscoon wrote:
4
change="{img.alpha=slider.value}
to this
change="{img.alpha=slider.value/100}
- ColdFusion 8 FCKeditor Vulnerability
- Ajax Same Origin Policy No More with Firefox 3.5
- Firefox 3.5 Introduces Origin Header, Security Features
- Tips for Secure File Uploads with ColdFusion
- 7 Years And Blog Entry Number 700
- CFCatch Java Exceptions
- Cheat Sheet for SQL Server
- CFML on Google App Engine for Java
Subscribe to my RSS Feed:
RSS
RSS
add to del.icio.us
Pete Freitag is a software engineer, and web developer located in











