topical media & game development

talk show tell print

explorer-effects-MoveEffectExample.mx

explorer-effects-MoveEffectExample.mx [swf] flex


  <?xml version="1.0"?>
  <!-- Simple example to demonstrate the Move effect. -->
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  
      <mx:Script>
          <![CDATA[
  
              private function moveImage():void {
                  myMove.end();
                  myMove.xTo=mouseX-60; 
                  myMove.play();
              }
        ]]>
      </mx:Script>
  
      <mx:Move id="myMove" target="{img}"/>
  
      <mx:Panel title="Move Effect Example" width="95%" height="95%" 
          paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
  
         <mx:Text width="100%" color="blue" 
             text="Click anywhere on the canvas to move the phone horizontally to that position"/>
  
          <mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage();">
  
              <mx:Image id="img" source="@Embed(source='explorer-effects-assets-Nokia_6630.png')"/>
  
          </mx:Canvas>
      
      </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.