Flash Gordon
01-02-2008, 07:58 PM
I find myself often making interfaces for custom class that extends Sprite.
var fudcake:IFun = new Bar(); // extends Sprite
//
// later on....
fudcake.x = 20;
However at some point I often need to access a property "fudcake" as a displayobject and not just the interface that I've created. Is there a undocumented IDisplayObject, or is my logic in recasting my "fudcake" bad OO? Or should I just make my own IDisplayObject interface and have IFun extend it?
Currently I just tend to cast fudcake like so DisplayObject(fudcake).x = 20, and get on with life.
var fudcake:IFun = new Bar(); // extends Sprite
//
// later on....
fudcake.x = 20;
However at some point I often need to access a property "fudcake" as a displayobject and not just the interface that I've created. Is there a undocumented IDisplayObject, or is my logic in recasting my "fudcake" bad OO? Or should I just make my own IDisplayObject interface and have IFun extend it?
Currently I just tend to cast fudcake like so DisplayObject(fudcake).x = 20, and get on with life.