ok i am mad that i cant figure this out after to long. here is what i need;
I have a mc instance named mech, and my mouse cursor instance name aim ( so the mouse shows up just as the aim thing crosair) i have it so when u click it makes a laser mc show up where ur position is, but i need to have it move towards where the cursor was at the time, the code i have for this so fari is:
on the main timeline:
where ground is the mc for the entier stage , (ne way to make that so i can just click and hold?) and laser is the instance name for my laser on the screen.Code:ground.onPress = function() { trace("mc clicked"); laserCounter++; _root.laser.duplicateMovieClip("laser"+laserCounter,_root.getNextHighestDepth()); _root["laser" + laserCounter]._visible=true; };
next code: on the laser mc
please help i kno its not hard but i just need it fixed, thanks !Code:onClipEvent (load) { this._x=_root.mech._x; this._y=_root.mech._y; laserMoveSpeed=10 } onClipEvent (enterFrame) { //i need the code here for finding the angle, // and using it to do move speed so the lsaer moves towards where //the mouse crosair thing is }




Reply With Quote