FLEX 案例源码

    <?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   
      xmlns:s="library://ns.adobe.com/flex/spark"   
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()"> 
 <s:layout> 
  <s:BasicLayout/> 
 </s:layout> 
 <fx:Declarations> 
  <!-- 将非可视元素(例如服务、值对象)放在此处 --> 
  <s:HTTPService id="serv"  url="http://localhost:8080/ServletTest/bendi"> 
     
  </s:HTTPService> 
    
    
  <mx:Rotate id="my" angleTo="45"> 
     
  </mx:Rotate> 
  <mx:Rotate id="my1" angleTo="30"> 
     
  </mx:Rotate> 
  <mx:Rotate id="my2" angleTo="70"> 
     
  </mx:Rotate> 
  <mx:Rotate id="my3" angleTo="10"> 
     
  </mx:Rotate> 
  <mx:Resize id="fx" widthTo="300" heightTo="200"> 
     
  </mx:Resize> 
  <mx:Resize id="fx1" widthTo="80" heightTo="74"> 
     
  </mx:Resize> 
  <mx:Dissolve id="di" alphaFrom="1.0" alphaTo="0.1"> 
     
  </mx:Dissolve> 
  <mx:Glow id="gl" alphaFrom="1.0" alphaTo="0.3"  blurXFrom="0" blurXTo="50" blurYFrom="0" blurYTo="50" color="#FF0000"> 
     
  </mx:Glow> 
    
  <mx:Iris id="irisOut" duration="1000" showTarget="true"/> 
  <mx:Iris id="irisIn" duration="1000" showTarget="false"/> 
    
    
  <s:Move id="mo" xBy="50" yBy="50"> 
     
  </s:Move> 
 </fx:Declarations> 
 <fx:Script> 
  <![CDATA[  
   public function init():void  
   {  
     
    serv.send();  
   }  
  ]]> 
 </fx:Script> 
 <mx:Image id="flex" source="@Embed('/tx/2.jpg')" visible="{cbx.selected}" showEffect="{irisIn}" hideEffect="{irisOut}"/> 
 <mx:CheckBox id="cbx" label="visible" selected="true"/> 
   
 <mx:Image rollOverEffect="{fx}" rollOutEffect="fx1" mouseDownEffect="my3" height="102" width="106" id="pic"  source="/ServletTest/bendi?spec=2" x="74" y="93"/> 
 <mx:Image mouseDownEffect="gl" x="178" y="93" width="104" source="/ServletTest/bendi?spec=2" height="102"/> 
 <mx:Image mouseDownEffect="my1" x="283" y="93" width="104" source="/ServletTest/bendi?spec=2" height="102"/> 
 <mx:Image mouseDownEffect="{di}" x="387" y="93" width="104" source="/ServletTest/bendi?spec=2" height="102"/> 
 <mx:Image  rollOverEffect="{mo}" source="/ServletTest/bendi?spec=2" x="124" y="265" width="103" height="77"/> 
</s:Application>