onClipEvent (load) {
this._y = 1;
this._x = 1;
this.speed = 4;
}
onClipEvent (enterFrame) {
if (this._y>_root.mouse._y+5) {
this._y -= this.speed;
}
if (this._y<_root.mouse._y-5) {
this._y += this.speed;
}
if (this._x>_root.mouse._x-5) {
this._x -= this.speed;
this.gotoAndPlay(1);
}
if (this._x<_root.mouse._x+5) {
this._x += this.speed;
}
if (this._x<_root.mouse._x-1) {
this.gotoAndPlay(53);
}
if (this._x>_root.mouse._x+1) {
this.gotoAndPlay(1);
}
this.setProperty (this, _rotation, mouse)
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.mouse)) {
_root.gotoAndPlay(3);
}
}
I need to change the line about rotation. I can't get it to rotate to face the movieclip "mouse" around line:
this.setProperty (this, _rotation, mouse)
Can somebody correct me?