Hi all,
So I’m trying to extend the movieClip() class and assign an onEnterFrame function as follows:
class MovableCharacter extends MovieClip {
var mc:MovieClip;
public function MovableCharacter (mc, tW, tH, i, j) {
[INDENT]this.mc = mc;
mc.attachMovie (“char”, “char”, mc.getNextHighestDepth());
mc.char._x = tW * j + Math.floor(mc.char._width/2) + (tW - mc.char._width);
mc.char._y = tH * i + Math.floor(mc.char._height/2) + (tH - mc.char._height);
}
/* MOVEMENT function*/
public function onEnterFrame () {
[INDENT]this._x += 4;
_root.output.text = “enterFrame”;[/INDENT]
}[/INDENT]
}
for some reason the onEnterFrame() is not being called. I got the idea for this struction from the OOP version of the snow tutorial. If anyone that can tell me what is up with extending the movieClip class like this I will be stoked. Thanks.