topical media & game development

talk show tell print

explorer-effects-DissolveEffectExample.mx

explorer-effects-DissolveEffectExample.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <!-- Simple example to demonstrate the Dissolve effect. -->
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  
      <mx:Dissolve id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
      <mx:Dissolve id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
  
      <mx:Panel title="Dissolve Effect Example" 
          width="95%" height="95%" layout="horizontal" 
          paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
  
          <mx:VBox height="100%">
              <mx:Label text="Nokia 9930"  
                  fontSize="14"
                  visible="{cb1.selected}"
                  hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
              
              <mx:Image source="@Embed(source='explorer-effects-assets-Nokia_6630.png')" 
                  visible="{cb1.selected}"
                  hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
          </mx:VBox>
              
          <mx:VBox height="100%" width="100%">
              <mx:Text width="100%" color="blue" 
                  text="Use the Dissolve effect to show or hide the text, image, and button."/>
              
                  <mx:Spacer height="100%"/>
              
                  <mx:Button label="Purchase" 
                      visible="{cb1.selected}"
                      hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>            
          </mx:VBox>
  
          <mx:ControlBar>
              <mx:CheckBox id="cb1" label="visible" selected="true"/>
          </mx:ControlBar>
      </mx:Panel>
  </mx:Application>
  


(C) Æliens 27/08/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.