jsimpson
08-03-2007, 06:24 AM
I'm trying to figure out what events allow properties to be modified and at what level I have to make changes to allow them to be reusable. In top flash sites, or at least those winning awards, there's often a mouse over effect on links that is consistent throughout the entire site.
I'm attempting to do the following:
1. Create a button that has three events happen on rollOverEffect and rollOutEffect
Label's Color change gradually
Label's X position change (like move xBy)
Buttons Icon to fade in
2. Create in such a way that I can then specify the same effects for list items in trees and datagrids. So that when you mouse over them they perform the same operations.
So far I have a parallel tag with a few events, and a button that uses it for its effect.
<mx:Parallel id="RollOver1">
<mx:Move xBy="10" duration="500" />
</mx:Parallel>
<mx:Parallel id="RollOut1">
<mx:Move xBy="-10" duration="500" />
</mx:Parallel>
<mx:Button label="Sample Text" rollOverEffect="{RollOver1}" rollOutEffect="{RollOut1}"/>
This works to a degree, but I don't have the ability to seperate what parts of the button should be moved, and there isn't a quick color change. How would I go about making something along the lines I mentioned? And if I have to create some sort of item renderer, which I've had almost no success with, what methods do I need to be overriding? Thanks for your help!
I'm attempting to do the following:
1. Create a button that has three events happen on rollOverEffect and rollOutEffect
Label's Color change gradually
Label's X position change (like move xBy)
Buttons Icon to fade in
2. Create in such a way that I can then specify the same effects for list items in trees and datagrids. So that when you mouse over them they perform the same operations.
So far I have a parallel tag with a few events, and a button that uses it for its effect.
<mx:Parallel id="RollOver1">
<mx:Move xBy="10" duration="500" />
</mx:Parallel>
<mx:Parallel id="RollOut1">
<mx:Move xBy="-10" duration="500" />
</mx:Parallel>
<mx:Button label="Sample Text" rollOverEffect="{RollOver1}" rollOutEffect="{RollOut1}"/>
This works to a degree, but I don't have the ability to seperate what parts of the button should be moved, and there isn't a quick color change. How would I go about making something along the lines I mentioned? And if I have to create some sort of item renderer, which I've had almost no success with, what methods do I need to be overriding? Thanks for your help!