I am new at this forum. I posted at devshed.com. No help there. I am still trying to learn AS2.0 OOP as well. Any help would be appreciated.
I have an object that extends a movie clip. I would like to load an external clip within this class defininition like so:
class Backdrop extends MovieClip;
public function init():Void {
this.loadMovie("backdrop.swf");
}
}
When i do so, there i get this error: “Target not found: Target=“undefined” Base=”_level0""
Now, i have also tried this:
class Backdrop extends MovieClip {
public function init():Void;
loadMovie("backdrop.swf", this);
}
}
That should do basically the same thing, but AS doesn’t allow it because the second parameter expects a MovieClip, not a Backdrop object.
Now if i manually enter the target with
_root.backdrop.loadMovie("backdrop.swf");
that works, but it seems to me that defeats the purpose of putting it in the class definition in the first place. It is not abstract that way.
I hope i am making sense. Basically, i want to know if either
(a) There is a way to trace the target of the this property or
(b) If there is a way to force the loadMovie function to take subclass from the MovieClip object