Change this code
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
setProperty(this, _rotation, -0);
setProperty(this, _x, this._x -7);
} else if (Key.isDown(Key.RIGHT)) {
setProperty(this, _rotation, 0);
setProperty(this, _x, this._x +7);
}
By the
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= 8;
} else if (Key.isDown(Key.RIGHT)) {
_x -= -8;
}
But in the hittest
Not working
onClipEvent(enterFrame)
{ if(this.hitTest(_root.b2)){ this._x= 0
}
}
So is
example