alekos
06-05-2005, 02:37 PM
hello there i am a step before the solution of my problem here is the code i have for the rotation of the movie clip onClipEvent (enterFrame) {
{
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
myDegrees = Math.round((myRadians*180/Math.PI));
this._rotation = myDegrees+215;
}
on (release){
ball._rotation =45 -_root.angle;
_root.t = 0;
_root.ball.fired = true;
}
and this is the code on the bomb onClipEvent (enterFrame) {
if (_root.ball.fired) {
_root.t += .3;
_root.releaseFire (75, _root.angle,_root.ball);
..............................._root.angle=myDegre es+90;.................}
what i want is when i rotate the gun with the mouse the ball will follow the direction of the gun.With this code the ball always goes on the 90 i think the problem is on the last line because it doesn't read x and y from the mouse please someone help me!!!!!
{
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
myDegrees = Math.round((myRadians*180/Math.PI));
this._rotation = myDegrees+215;
}
on (release){
ball._rotation =45 -_root.angle;
_root.t = 0;
_root.ball.fired = true;
}
and this is the code on the bomb onClipEvent (enterFrame) {
if (_root.ball.fired) {
_root.t += .3;
_root.releaseFire (75, _root.angle,_root.ball);
..............................._root.angle=myDegre es+90;.................}
what i want is when i rotate the gun with the mouse the ball will follow the direction of the gun.With this code the ball always goes on the 90 i think the problem is on the last line because it doesn't read x and y from the mouse please someone help me!!!!!