topical media & game development

talk show tell print

animation-ch15-Tree.ax

animation-ch15-Tree.ax [swf] [flash] flex


  package {
          import flash.display.Sprite;
          
          public class @ax-animation-ch15-Tree extends Sprite {
                  public var xpos:Number = 0;
                  public var ypos:Number = 0;
                  public var zpos:Number = 0;
                  
                  public function @ax-animation-ch15-Tree() {
                          init();
                  }
                  public function init():void {
                          graphics.lineStyle(0, 0xffffff);
                          graphics.lineTo(0, -140 - Math.random() * 20);
                          graphics.moveTo(0, -30 - Math.random() * 30);
                          graphics.lineTo(Math.random() * 80 - 40, -100 - Math.random() * 40);
                          graphics.moveTo(0, -60 - Math.random() * 40);
                          graphics.lineTo(Math.random() * 60 - 30, -110 - Math.random() * 20);
                  }
          }
  }


(C) Æliens 04/09/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.