topical media & game development

talk show tell print

sample-flex-shape.mx

sample-flex-shape.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  

getting (in) shape(s)


  <mx:Application
     xmlns:mx="http://www.adobe.com/2006/mxml"
     xmlns:my="*"
     layout="absolute"
     creationComplete="init()">
  

script


  <mx:Script>
  <![CDATA[
  import flash.display.*;
  
  

init(s)


  private function init():void {
  var x:Sprite = new sample_flex_shape_script();
  this.rawChildren.addChild(x);
  var circle:Shape = new Shape()
    var xPos:Number = 100;
    var yPos:Number = 100;
    var radius:Number = 50;
    circle.graphics.beginFill(0xFF8800);
    circle.graphics.drawCircle(xPos, yPos, radius);
    this.rawChildren.addChild(circle);
  
  }
  
  ]]>
  </mx:Script>
  
  

canvas


  
  <mx:Canvas backgroundColor="0x66CC66"  height="100%" width="100%">
  <my:sample_flex_shape_script w="200" h="200" />
  <my:sample_flex_shape_anim x="200" y="200" />
  <my:sample_flex_shape_anim x="500" y="200" />
  <my:sample_flex_shape_script w="600" h="600" />
  </mx:Canvas>
  <my:sample_flex_shape_logo right="20" bottom="10" />
  </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.