Actionscript 3 Sprite AddChild

Posted by Amy on Stack Overflow See other posts from Stack Overflow or by Amy
Published on 2010-03-19T07:29:15Z Indexed on 2010/03/19 7:31 UTC
Read the original article Hit count: 347

Filed under:
|

Im new to actionscript 3 and am a little confused about how the addchild function works.

I want to draw 5 houses. each house has a roof and wall. Each wall has a door and a window. I have the following classes and this is how I grouped them

class Main
  class House
    class Roof  //a triangle
    class Wall  //a rectangle
      class Door //a rectangle
      class Window //a square

Im having trouble with inheritance of the classes. I cant made the wall class show up with a window and a door. Can someone point me to the right direction?

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about sprite