PDA

View Full Version : make me happy


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!!!!!

henkep
06-05-2005, 03:21 PM
http://www.actionscript.org/tutorials/beginner/games_in_flash/index.shtml

CyanBlue
06-05-2005, 04:41 PM
Didn't you have the thread that discusses this problem already, alekos??? Or are you just creating new threads whenever you feel like to???

In case nobody told you yet, please following the forum rules...
#1. Do not crosspost...
#2. Use descriptive topic
#3. Use AS tag to format your code...