|
First you need to create effect objects. In the sample below you can
find 2 fade effects and 2 move effects. There 2 approaches that I use:
HTH <?xml
version="1.0" encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"> <mx:Fade
alphaFrom="0.2" alphaTo="1" id="myFadeIn"
duration="500"/> <mx:Fade
alphaFrom="1" alphaTo="0.2" id="myFadeOut"
duration="500"/> <mx:TextInput
x="27" y="27" text="" alpha="0.2"
focusInEffect="myFadeIn" focusOutEffect="myFadeOut"
id="myText" /> <mx:TextInput
x="27" y="54" text="" alpha="0.2"
focusInEffect="myFadeIn" focusOutEffect="myFadeOut"
id="myText2" /> <!--
non-effect event triggered effects --> <mx:Script> <![CDATA[ public
function handleSwap() : void { if
(myText.y > 27) { MoveUp.target
= myText; MoveDown.target
= myText2; } else { MoveUp.target
= myText2; MoveDown.target
= myText; } MoveUp.play(); MoveDown.play(); } ]]> </mx:Script> <mx:Move
id="MoveUp" yFrom="54" yTo="27"
duration="500"/> <mx:Move
id="MoveDown" yFrom="27" yTo="54"
duration="500"/> <mx:Button
label="Swap Text Fields" click="handleSwap()"/> </mx:Application> From: Hi all, -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [flexcoders] Fade Text in and out, when text variable is ch... Pascal Schrafl
- RE: [flexcoders] Fade Text in and out, when text varia... Iko Knyphausen

