We Recommend

HTML Dog: The Best-Practice Guide to XHTML and CSS HTML Dog: The Best-Practice Guide to XHTML and CSS
For readers who want to design Web pages that load quickly, are easy to update, accessible to all, work on all browsers and can be quickly adapted to different media, this comprehensive guide represents the best way to go about it.


Posted By

madra on 10/10/07


Tagged

textmate oop Objects api graphic Drawing addChild


Versions (?)


drawing in a new object


Published in: ActionScript 


  1. // import necessary classes
  2. import flash.display.DisplayObject;
  3. import flash.display.Graphics;
  4. import flash.display.Shape;
  5. import flash.display.Sprite;
  6.  
  7. // instantiate object
  8. yaddayadda = new objectname();
  9.  
  10. // importinkt! - you need to attach it to the drawing layer
  11. // otherwise its content willnae show up
  12. this.addChild(yaddayadda);

Report this snippet 

You need to login to post a comment.