Ach. I have a class that extends MovieClip called AxonClip, and a class that extends AxonClip called Target. I create several new Target objects like so:
Targets* = new Target("Targ"+i);
Targets*.attachMovie("TargetArt", "TarGuy"+i, iDepth);
Later I update the position of that Target by changing its _x property. This seems to happen, as I can then trace(_x) and see that physics things are changing it. However, the clip never appears no matter what I do. I suspect this is because my Target class is not actually inheriting all the properties and methods that MovieClip has. If this is the case, is there something I can put in my class declaration, constructor or elsewhere to make sure these things inherit from MovieClip?
Also, is the AttachMovie even necessary, is there a better way to do it like linking a clip from the library to the particular class?
I’m not following you 100%… attachMovie doesn’t create anything, it just attaches a clip to an existing MovieClip, right? If I want to do the equivalent of that “new Target()” statement given that it’s a MovieClip, what do I use?
has the “InitObject” written in brackets, with a call to a function in that Object’s class definition after the statement(?!). Yet other documentation (the AS dictionary on MM’s site) has it in square brackets. Can someone explain exactly how the whole InitObject thing works? What’s the syntax, and when it is necessary and not necessary?