topical media & game development

talk show tell print

professional-flex-code-15-CustomEffectEvent.mx

professional-flex-code-15-CustomEffectEvent.mx [swf] flex


  <?xml version="1.0"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comps="*" 
          backgroundColor="#FFFFFF">
  
    <mx:Script>
            <![CDATA[
              private function glow(status:Boolean):void{
          t1.glow=status;
          t2.glow=status;
        }
      ]]>
    </mx:Script>
  
    <mx:Sequence id="glowing" repeatCount="0">
      <mx:Glow duration="250" alphaFrom="1.0" alphaTo="0.5" blurXFrom="3" blurXTo="13" blurYFrom="3" blurYTo="13"/>
      <mx:Glow duration="250" alphaFrom="0.5" alphaTo="1.0" blurXFrom="13" blurXTo="3" blurYFrom="13" blurYTo="3"/>
    </mx:Sequence> 
      
    <mx:Glow id="unglow" duration="500" alphaFrom="0.5" alphaTo="1.0" blurXFrom="13" blurXTo="0.0" blurYFrom="13" blurYTo="0.0"/>
  
    <mx:Panel title="Custom Effect Events"  width="240" height="250" 
      paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> 
      
      <comps:professional_flex_code_15_GlowingTextInput id="t1" text="Tab between to" width="200" glowOnEffect="{glowing}" glowOffEffect="{unglow}"/>
      <comps:professional_flex_code_15_GlowingTextInput id="t2" text="trigger effects" width="200" glowOnEffect="{glowing}" glowOffEffect="{unglow}"/>
  
      <mx:HBox>
        <mx:Button label="All On" click="this.glow(true)"/>
        <mx:Button label="All Off" click="this.glow(false)"/>
      </mx:HBox>
    </mx:Panel>
   
  </mx:Application>
  
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.