Fade, Dissolve, Iris, Zoom, WipeRight, WipeLeft, WipeUp, WipeDown : Wipe Effect « Effects « Flex






Fade, Dissolve, Iris, Zoom, WipeRight, WipeLeft, WipeUp, WipeDown

Fade, Dissolve, Iris, Zoom, WipeRight, WipeLeft, WipeUp, WipeDown
        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="changeEffect(event)">
  <mx:Script>
    
      import mx.effects.*;
      private var myEffect:Effect;
      
      private function changeEffect(event:Event):void{
        switch (effectList.selectedItem){
          case "Fade" :
            myEffect = new Fade();      
            break;
          case "Dissolve" :
            myEffect = myDissolve;
            break;
          case "Iris" :
            myEffect = new Iris();
            break;
          case "Zoom" :
            myEffect = new Zoom();
            break;
          case "WipeRight" :
            myEffect = new WipeRight();
            break;
          case "WipeLeft" :
            myEffect = new WipeLeft();
            break;
          case "WipeUp" :
            myEffect = new WipeUp();
            break;
          case "WipeDown" :
            myEffect = new WipeDown();
        }
        myImage.setStyle("showEffect", myEffect);
        myImage.setStyle("hideEffect", myEffect);
      }
      
  
  </mx:Script>
  
  <mx:Dissolve id="myDissolve" color="red"/>
  <mx:VBox>
      <mx:Image id="myImage" source="logo.jpg"/>
      <mx:Button label="Show Image" click="myImage.visible=true"/>
      <mx:Button label="Hide Image" click="myImage.visible=false"/>
      <mx:Label text="Select an Effect" fontWeight="bold"/>
      <mx:List id="effectList" change="changeEffect(event)" selectedIndex="0">
        <mx:dataProvider>
          <mx:String>Fade</mx:String>
          <mx:String>Dissolve</mx:String>
          <mx:String>Iris</mx:String>  
          <mx:String>Zoom</mx:String>  
          <mx:String>WipeRight</mx:String>  
          <mx:String>WipeLeft</mx:String>  
          <mx:String>WipeUp</mx:String>  
          <mx:String>WipeDown</mx:String>  
        </mx:dataProvider>
      </mx:List>
  </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.WipeLeft for Button rollOverEffectWipeLeft for Button rollOverEffect
2.Play the WipeLeft effect each time the selected tab changesPlay the WipeLeft effect each time the selected tab changes
3.ActionScript and WipeLeft effectActionScript and WipeLeft effect
4.A wipe down effect trigger of the target componentA wipe down effect trigger of the target component
5.Define a set of wipe effects that Flex executes when the user toggles the chart's visibilityDefine a set of wipe effects that Flex executes when the user toggles the chart's visibility
6.Use Wipe effect when creating a Button completelyUse Wipe effect when creating a Button completely
7.Create the WipeLeft effect in ActionScriptCreate the WipeLeft effect in ActionScript
8.A custom mask with a WipeLeft effectA custom mask with a WipeLeft effect
9.Use Wipe effect as part of a transition that changes the font color of a button control from black to redUse Wipe effect as part of a transition that changes the font color of a button control from black to red
10.WipeLeft transitionWipeLeft transition
11.WipeRight and ViewStackWipeRight and ViewStack
12.Set WipeLeft and WipeRight with setStyle methodSet WipeLeft and WipeRight with setStyle method