Parallel effects for moving : Parallel Effect « Effects « Flex






Parallel effects for moving

    
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#eeeeee">

  <mx:Parallel id="moveOn">
    <mx:Move xFrom="{0-myImage.height}" xTo="150" yFrom="100" yTo="100"/>
    <mx:Rotate originX="{myImage.width/2}" originY="{myImage.height/2}"/>
  </mx:Parallel>
    
  <mx:Parallel id="moveOff">
    <mx:Move xTo="{0-myImage.width}" xFrom="150" yFrom="100" yTo="100"/>
    <mx:Rotate originX="{myImage.width/2}" originY="{myImage.height/2}" angleFrom="360" angleTo="0"/>
  </mx:Parallel>
    
  <mx:Image id="myImage" source="logo.jpg" x="150" y="100" showEffect="{moveOn}" hideEffect="{moveOff}"/>
  <mx:Button x="150" y="375" label="Show Image" click="myImage.visible=true"/>
  <mx:Button x="374" y="375" label="Hide Image" click="myImage.visible=false"/>
</mx:Application>

   
    
    
    
  








Related examples in the same category

1.Parallel effect with Parallel effect with <mx:Parallel>
2.Add various effects to ParallelAdd various effects to Parallel
3.Play effects from a ParallelPlay effects from a Parallel