hey, i need the help of some of u trigonomitry people out there )
ive created a black box with the dimensions 100 *5 and made it into a movie clip with the center in the right corner
and with this AS i was hoping to make it always point at the mouse
onClipEvent (enterFrame) {
xd=_root._xmouse-this._x;
yd=_root._ymouse-this._y;
this._rotation=100*Math.tan(xd/yd)*-1;
trace("rotation "+this._rotation);
trace("x_dist "+xd);
trace("y_dist "+yd);
}
now this , is not working =)
and i want to know how i would make it work so one of the short ends of the box is always pointing in the direction of the mouse.
Thanks
VOS