I have four classes -
class Init - intialises some variables, and is the doc Class.
class Street - loads XML data for, say, a number of streets in a particular area
class House - loads in the houses data for one particular street
class DisplayHouse - displays graphics on screen for the houses
This all seems to be working apart from the actual graphical display of objects.
In the ouput window I am seeing the results I need to see pertaining the the XML data loaded.
The problem is that in House - I have the code :
var new _house = new DisplayHouse();
and DisplayHouse is a simple graphics-shape:
var drawHouse:Sprite=new Sprite();
code… to draw house!
Now, when I comile, I keep getting this error:
Description: 1180:call to undefined method addChild
Source: addChild (_house);
House extends sprite and has import Sprite and all that! - infact all the classes have the same imports and extend Sprite!
semi-colons are all in right places, there are no typos!
I simply cannot understand why addChild is an undefined method in this case!?!?!
any help out there, would be greatly appreciated.