I'm currently working on a project where we are working with a lot of nested
MovieClips which all have classes assigned extending MovieClip. The main
problem we are having is the classic chicken-before-the-egg scenario where
we are trying to access properties of an object which has not yet been
casted into it's proper class by the player.
class B extends MovieClip {
// EventDispatcher
public var addEventListener:Function;
public var removeEventListener:Function;
private var dispatchEvent:Function;
public function B {
EventDispatcher.initialize(this);
}
}
class A extends MovieClip {
private var b:B;
public function A {
b.addEventListener("onSomeEvent", this);
}
}
... and the addEventListener is never called unless a frame has elapsed
between A being introduced on the stage and B's constructor has been called.
I'm looking for tips on a solid way of handling both existing on-stage
MovieClips that have classes assigned.
--
Regards,
Simen Brekken
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org