Rotate Image On Mouse-hold
Hello, I tried the great tutorial Object VR in Flash by Tim Murray (http://www.flashkit.com/tutorials/3...r-989/index.php) where I can easily rotate objects. Now, the object always rotates when I go over the image sequence. Do you know the coding, that it just turns when I press and hold the left mouse-button?
Thanks a lot... Michael
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-17-2006, 08:16 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[Q] Rotate With Mouse Hold And Drag
Hi
I have a simple symbol (a beam) ..
I want user can click on it and hold mouse down and when he drags mouse my symbol can rotate. I mean for example if I drag mouse top or bottom my symbol rotate CC or CCW. I mean like a disk user can rotate it with mouse.
thanks in advance
Press And Hold Mouse Button To Rotate MC?
on (press) {
setProperty (_root.shape, _rotation, getproperty("/shape", _rotation)-3);
}
I am using the above coded to rotate a movieclip... I need it to be posible for the user to press and hold the mouse button down to rotate the MC and then stop when they release.... anyone got a suggestion.
Cheers
Ollie
Rotate Image Using Mouse
I have to rotate an image(circular) using mouse
1) In clockwise direction
2) In anticlockwise direction
3) Free rotation in clockwise as well as anticlockwise direction
Any help received would be appreciated
-Richa
Rotate Image With Mouse
Hey,
i try to rotate an image with the mouse but i dont know how!
i impl. some listeners to react if mouse is on the pic and when i pressed down the mouse button!
What i want is this:
If i click on the picture the pic rotate in which side i move the mouse.
just on the x-axis.
if i move to left side, the pic should rotate to left and if i move the mouse to the right the pic rotate to right side.
how can i make this! All that should happen when i pressed the mouse button and i move the mouse!
pls help me!
greets Patrick
me german, so you can answer in german or engl!
Please Help...Need To Rotate Image/MC By Moving Mouse
Hi all,
I'm sure a lot of you have seen the tutorials for buttonless scrolling (where you move your cursor to the right of the screen and the movieclip scrolls to the left etc). Here is an excellent example...http://www.gotoandlearn.com/ (and then scroll down until you get to the title, 'Scrolling Thumbnail Panel'.
Now, I want to use this principle to rotate a MC of the world instead of scrolling the MC left and right. So, as your cursor moves to the right of the screen, the globe rotates in an anti-clockwise direction and visa versa.
Could anyone help moderate the code below (or provide new code) to make this work? I've tried a few things but none of them work. Thanks!! (Really need this for campaign at work!! Panicking a bit).
FG.
the code...
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 89) {
panel._x = 89;
}
if(panel._x <= -751) {
panel._x = -751;
}
var xdist = _xmouse - 250;
panel._x += Math.round(-xdist / 7);
}
How Do I Rotate Objects And Still Hold It's Position Or Obstructability?
Hi,
I'm new here but I already have a tough question.
I've tried using Gary Fixler code at this page:
http://www.flash-creations.com/notes...nceCollide.php
and translated it in actionscript 3.
But the rotating and mousehandling won't work.
My object rotates very oddly and I can only catch the object with my mouse
using trigonometry to search the center of the object.
Below is my function of the movement of object.
Code:
public function step(timeEvent:TimerEvent):void {
var p:Point,
stopped:Boolean = false;
ys = 0;
xs = 0;
c = 0;
hitFloorX = 0;
ax = 0;
ay = gravity;
vx += int(ax*16)/16;
if(Math.abs(vx) > 0.0625) {
vx = vx*friction/256;
}
vy += int(ay*16)/16;
if(Math.abs(vy) > 0.0625) {
vy = vy*friction/256;
}
for(var i:String in perim) {
// if offstage to BOTTOM
p = new Point(x+perim[i].x, y+perim[i].y);
// total y of all sentries
ys += p.y;
// total x of all sentries
xs += p.x;
// count of sentries
c++;
if(stopped==false) {
if (p.y + vy < 0) {
y = 0;
hitFloorX = p.x;
vy = int(bounce*-vy*10)/10;
stopped = true;
}
//trace("pny > 480:"+(p.y + vy));
if (p.y + vy > APP_HEIGHT) {
y = APP_HEIGHT - height;
hitFloorX = p.x;
vy = int(bounce*-vy*16)/16;
if(vy > -.0625) {
vy = 0;
ay = 0;
}
if(Math.abs(vx) < .0625) {
vx = 0;
}
stopped = true;
}
// same for if offstage to LEFT
if (p.x + vx <0) {
x = 0;
hitWallY = p.y;
if (vy<0) {
vy *= d;
}
//vx = int(bounce*-vx*16)/16;
stopped = true;
}
if (p.x + vx > APP_WIDTH) {
x = APP_WIDTH - width;
hitWallY = p.y;
vx = int(bounce*-vx*16)/16;
stopped = true;
}
}
}
if (hitFloorX) {
// diff = amount of off-centeredness over floor intersection point
diff = (xs/c)-hitFloorX;
// (these numbers from experimentation)
r = (r+diff*(vy/350))/1.2;
vy *= -1.4*d;
vx *= d;
// if clip is rotating, move it in direction of rotation too
// (move an amount relative to amount of rotation)
vx += r*2;
}
if (hitWallY) {
diff = (ys/c)-hitWallY;
vx *= -1*d;
}
if(stopped==false) {
x += vx;
y += vy;
}
rotation += r;
r *= 0.95;
(parent as Engine).debug = "vy:"+vy+"
";
(parent as Engine).debug += "vx:"+vx+"
";
(parent as Engine).debug += "rot:"+rotation;
}
Help With Bullets Hold Mouse Down ?
hey .. im in the making of a alien invaders type game .. and i wanna input an upgrade after level 3 .. like u can purchase it or something .. i wanna have it upgrade to rapid fire .. like holding the mouse down .. but i cant seem to figure out how to make it fire by holding the mouse down.. the code i have says _rootonMouseDown = function .. so why wouldnt that repeat the action .. ? im baffled ne help would be apprieciated .. heres the link to the game so far..
http://img46.exs.cx/my.php?loc=img46...vaders2223.swf
also if it helps heres the code im using
//-------------MOUSE CLICK----------//
_root.onMouseDown = function() {
// duplicate the bullet mc
attachMovie("bullet", "bullet"+bulletNum, bulletNum);
// set the coords to the mouse clik
eval("_root.bullet"+bulletNum)._x = _root.defender._x;
eval("_root.bullet"+bulletNum)._y = _root.defender._y;
// increment the bullet number
++bulletNum;
// if more than 5 bullets , start again at 0
if (bulletNum>5) {
bulletNum = 0;
}
};
Mouse Hold Popup Menu?
Hi, I am new to the scene and wondering if anyone can point me in the right direction. I want to create a popup menu that will appear anywhere within my screen just by holding down the mouse button for a few seconds. I cannot find anything that has already been done. Does anyone have examples or know some good pointers on how to make this work.
Thanks in advance.
Possible To Detect Mouse Button Hold?
does flash have a way of ascertaining that the mouse button is in the DOWN state, as seperate from detecting the instant it is pressed or released?
im making a custom scroll panel and i would like my arrow buttons to behave like browser arrows, if you hold them the window will continue to scroll.
the only thing i can think of is to begin scrolling on mouse press and wait for a release/rollout to stop. that scheme isnt 100% reliable though as it seems if a user moves his mouse very quickly out of the flash window sometimes rollouts and mouse releases are not detected. any better ideas?
thanks...
TRIG - MC Follow Mouse Rotate Around Mouse Point
I have read and i think i 'fully' understand (unless it gets more complicated or what not) the trig tutorial, on this site.
no offence i cant remeber who's tut.
i can make a movieclip circle another movie clip,static or moving.
but now, i have a movie clip that follows the mouse pointer when the up key is toggled.
and i want this movieclip to rotate around the mouse point,when the left key is either pressed or toggled, and reverse this movement for the right key.
i have tried a few things for this i can not get it to rotate, it just seems to jitter randomly.
i have tried rotating a completely static MC around mose point which also failed..
any help thanks?
this is the code that makes the clip face the mouse, and move to its position.
its a function called from another function.
its followed from a tut but i do understand it. This is not what im having troublewith,this works.
Code:
myRadians = Math.atan2(_root._ymouse-MYCLIP._y, _root._xmouse-MYCLIP._x);
myDegrees = Math.round((myRadians*180/Math.PI))+90;
MYCLIP._rotation = myDegrees;
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
MYCLIP._y += _root.yMove;
MYCLIP._x += _root.xMove;
_root.yChange = Math.round(_root._ymouse-MYCLIP._y);
_root.xChange = Math.round(_root._xmouse-MYCLIP._x);
}
to make it clear what i want, a MC that will circle the mouse point, when key is down or toggled, this movieclip also needs to be capable of moving towards mouse point on key down or toggle.
Cheers.
How To Repeatly The Function While Mouse Button Is Hold Down?
I have created a function that do things for me. Then I created a button with the script like this..
--snip--
on(press) {
functionMe();
}
--snip--
I realize that "functionMe()" is only called once when I press and hold down the mouse button. How do I get the "functionMe()" to be repeatly called while the mouse button is hold down??
Thanks...
Mouse Press And Hold On A Movie Symbol?
Hi, I'd like to know how to run a function when the user presses and holds down the mouse button on one of my movie symbols? I looked into listeners and event handlers, but I haven't been able to figure out exactly how I need to do this? Any and all help is appreciated. Thanks!
Mouse Press And Hold On A Movie Symbol?
Hi, I'd like to know how to run a function when the user presses and holds down the mouse button on one of my movie symbols? I looked into listeners and event handlers, but I haven't been able to figure out exactly how I need to do this? Any and all help is appreciated. Thanks!
How To Repeatly The Function While Mouse Button Is Hold Down?
I have created a function that do things for me. Then I created a button with the script like this..
--snip--
on(press) {
functionMe();
}
--snip--
I realize that "functionMe()" is only called once when I press and hold down the mouse button. How do I get the "functionMe()" to be repeatly called while the mouse button is hold down??
Thanks...
Hold And Drag MC(image) Inside MC(frame)
i want to give viewer the ability to hold and DRAG
MC2
in MC1
MC1 is gonna be the frame, while MC2 will be some bit bigger than MC1 (the frame), in dimension.
And the viewer would be able to HOLD and DRAG MC2's image in MC1's frame.
Please guide me with the actionscript required for it ?
Rotate With The Mouse
hmm looks i already regestered but ive never been here before..... oh well...
anyways... im trying to make an action script where a movie will rotate towards the mouse as it moves, so far i wrote this
onClipEvent (mouseMove) {
RyU = _root._ymouse;
Bloc = ball._y;
if ( RyU < Bloc) {
ball._rotation += 5;
}
}
obviosly im doing something wrong since it doesnt work. (ball being the movie name it is not literally a ball)
i wrote the script straight into the movie clip
id appreciate any help at all
Rotate With Mouse
im making a game and i cant get the cannon of my gun to rotate with the mouse. i only need it to rotate along the x axis. thx for any help.
Rotate With Mouse
why does this not work, or more correctly how can i make it right, i knew when writing it that it was horribly off but i had to try
Code:
onMouseDown = function () {
Click = true;
};
onMouseUp = function () {
Click = false;
};
onLoad = function () {
Click = false;
};
if (Click=true) {
if (MsPos<>-10006) {
Spinner._rotation += (_xmouse+MsPos)/20;
}
MsPos = _xmouse;
}
also if you have some extra time could you include how it would be coded if it were contained on the movieclip on the frame and how it would be coded if it were placed on the first frame of the movieclip. if you could do this i would be soo glad because it is essentially a problem i have been having with another(slightly more complicated) project which has been put on hold because i dont know how code changes in different places
but i digress
this horrid code is evidence of how much i have to learn and just helping with it would be great
Rotate With Mouse
I am new to flash and was wondering if someone could help me out with the actiocscript that would make a movieclip rotate with the mouse. I atached a small file that I was trying to do this and I am STUCK. Please help.
onClipEvent (enterFrame) {
this._rotation=_root._xmouse;
this._rotation=_root._ymouse;
}
this is the code as far as I got it.
Rotate MC Using Mouse
I'm trying to produce a movie clip that when clicked on can then be rotated using the mouse.
I've uploaded what I have so far. If you drag the Item called BackSkirt onto the rectangle you can see a blue circle. I would like this to be clicked on to start rotating the mc.
At present when you click on the circle it rotates the mc but I would like the rotation to follow the mouse.
I hope the above makes sense, any help would be appreciated.
Thanks
Jemes
Use Mouse To Rotate
Hi. I am making an RPG and I want the character to face the mouse (rotate so he is looking at the mouse). I am using Flash Pro 8 and the stage is 550 X 400 pixels. Any help is appreciated. Thankyou.
Rotate & Mouse
I need a mc to rotate to the mouse, now it works but only if its not in another movieclip, what i mean is i have a movieclip in a movieclip which will rotate when the mouse moves.
My script is on a mousemove Event.
Xd = _root.cursor._x-_x;
Yd = _root.cursor._y-_y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int((radAngle*360/(2*Math.PI))+90);
updateAfterEvent();
How To Rotate Something When The Mouse Is Dragged...
i hae an object, and i want it to rotate when the user clicks and drags their mouse... how do you do that?
also, i wanna make a check that is something like
if "top" rotation >45 gotoandplay (5)
so that one the opject is rotated to a certain degree it plays the timeline...
hope you know what i mean...
Need To Rotate Object With Mouse
In Flash MX
I want to have an arrow in the middle of the stage point to where the mouse is,but not move on the x or why,just rotate.I beleive the center point will be in middle of object,but what is the action script to have ot point? There will be menu items in a circle around the object. Help..not great at AS, but have a project due in 3 days!
madhatter1138
Rotate To Follow Mouse...?
how can i make my movieclip to follow my mouse, not in possition, but like... to point at my mouse, wherever it is... like this example:
click here
Rotate Towards Mouse Position
I'm new to as2, started to learn it a few weeks ago.
I want to make a line to rotate towards the mouse position everywhere the mouse goes about it's registration point.
I know there are many tutorials on this one. But many of them are old, the links to source files don't work anymore. While the others talk more on trigonometry than the actionscript itself. For a beginner, they are pretty confusing.
So I hope someone can explain to me how to do it or just paste the code here and I'll just replace the movie clip with mine and study it myself. Thanks.
AS - Movement After Mouse (x And Rotate)
Hello!
I want to have a ball, that will follow the mouse a little.. The ball will only follow the x way but i cant get it working. I have this code on the frame:
this.onEnterFrame=function(){
controlX=_xmouse*2-(x1+x2)/2;
move();{
_root.ball(controlX, 176.8)
}
}
I have no idea if this one is right in anyway.. but no error atleast.
The ball have the instance name "ball".
I also want that the ball will rotate how longer it is at the x way, so it will rotate as much as _xmouse.
Can someone change the code so it will work?
Rotate Mc By Mouse Movement
Hi guys,
i'm trying to build a "circular" menu that rotate on rollover and mouse move but with no good results. Just something like the yugo sliding menu but with buttons placed around a circonference.
I don't need a dinamic menu.
I need a function that let the menu rotate up when cursor is below the half of the circle and viceversa.
Could you please help me?
I've done a search and found a compass example but i really can't edit it. I'm a newbee and can't really figure out how to rotate a movie clip around its own axes on mouse move....
Thanks in advance and sorry for my english.
Rotate And Scale With Mouse
hello, this is one of my first posts on kirupa, heres the score,
well ive made a flash menu which is circular consisting of 4 circles in a circle shape, my idea is to make the whole menu scale when the mouse is movied upon its horizontal axis. and the menu to rotate when the mouse is moved upon its vertical axis, as well as this i want the mouse to keep its regular functions so that the user can click on the buttons on the menu, thankyou
in short i want to know how to
select a mc, control its rotation and scale with mouse movement upon selected axis's
heres teh menu im trying to rotate and scale
hope someone can help
http://www.freewebs.com/somewhatstupid/menu.fla
thanks in advance
Mayan
AS - Movement After Mouse (x And Rotate)
Hello!
I want to have a ball, that will follow the mouse a little.. The ball will only follow the x way but i cant get it working. I have this code on the frame:
this.onEnterFrame=function(){
controlX=_xmouse*2-(x1+x2)/2;
move();{
_root.ball(controlX, 176.8)
}
}
I have no idea if this one is right in anyway.. but no error atleast.
The ball have the instance name "ball".
I also want that the ball will rotate how longer it is at the x way, so it will rotate as much as _xmouse.
Can someone change the code so it will work?
Rotate Object Using Mouse Coordinates
Does anyone know how to or where I can find the actionscript for rotating an object on the spot by moving the cursor around the screen?.
Meaning when the mouse is to the right of the object it rotates left and if the cursor is to the left it rotates right.
while distance away from the object on screen affects the speed of rotation.
anyone know??
Rotate Movie Clip With Mouse?
how could i have a user rotate a moive clip by there mouse? like were the mouse is is were the rotation of the mouse will be. i included a file link, maybe youll get a better idea what im trying to do
http://www.onlinesolutions.netfirms.comMovie1.zip
Thanks
Mark
Help: Point To Mouse & Rotate Only If In Movieclip
I'm using Flash 5.
What I want my movie to do:
I have a color wheel movie clip with a pointer arm movie clip in the center. If the mouse if over wheelMC then the pointer should rotate to follow the mouse. If the mouse is outside wheelMC then the pointer does nothing.
What it actually does:
The pointer rotates & points to the mouse where ever it is.
My code is on the pointer movie clip:
onClipEvent (enterFrame) {
if (_root.wheel.hitTest(_root._xmouse, _root._ymouse, true)) {
a = pointer._y-_ymouse;
b = pointer._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
setProperty ("pointer", _rotation, degrees);
}
}
Frame By Mouse Position - 3d Rotate.
Please download this .fla file to understand what im talking about: http://www.sharemation.com/jondmac/r...la?unq=-bzczxq
I have tried to make a movie clip with some 3d expanded over several frames in scene 1 in the movie. Then at the click of a button it should go to and play scene 2, but instead it shows both scene 1 and scene 2 when "rotating" by the mouse position.
I is supposed to only "rotate" scene 1 from mouse position, and only play scene 2 when the button is clicked.
Please help me! I dont know how to fix this!
Rotate Movie Clip With Mouse
hello dear friends and "word up' to you on this fine warm day.
i am action xcripting in mx 2004
or rather ....
trying to!
chorrtle chorrtle chorrtle chorrtle
how does one alow the mc to rotate on a user mouse click?
**HELP** Rotate Objects With Mouse Cursor
I need some help with my Flash MX project.. We are creating a web page and i have made a custom navigation bar. my site is called High Speed Graphics.. Im using an RPM gauge to select my links. I need someone to help me to get the RPM needle to move with the mouse with i drag around the gauge. The object needs to rotate..not follow the mouse all over the screen like i have found. I need it to look like the needle is selecting the links.. I have already made the links.. i just need to needle to rotate in place with my mouse.. if any can help me please do so.. i would really appreciate it. Its for a college project and i need this asap! please help!! thanks..
Make Object Rotate W/ Mouse Over
ok, so here's the deal. i have a menu that rotates in a half circle. its always rotating unless you putt your mouse over it, then it stops. since this is a half circle, you cant see all the options at any one time, i wanted the user to be able to grab the circle, or put the mouse over a part of it to speed up the circle, or control it so they can rotate the object until their desired option appears. Can anyone help me figure out how to do this?
thanks for anything you can tell me
How Do I Rotate A Movieclip By Moving Mouse?
Hi all,
I'm sure a lot of you have seen the tutorials for buttonless scrolling (where you move your cursor to the right of the screen and the movieclip scrolls to the left etc). Here is an excellent example...http://www.gotoandlearn.com/ (and then scroll down until you get to the title, 'Scrolling Thumbnail Panel').
Now, I want to use this principle to rotate a MC of the world instead of scrolling the MC left and right. So, as your cursor moves to the right of the screen, the globe rotates in an anti-clockwise direction and visa versa.
Could anyone moderate the code below to make this work? I have a deadline in a week and I'm starting to panic. I've tried a few things but none of them work. Thanks!!
FG.
the code...
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 89) {
panel._x = 89;
}
if(panel._x <= -751) {
panel._x = -751;
}
var xdist = _xmouse - 250;
panel._x += Math.round(-xdist / 7);
}
Drag En Rotate With Mouse In Flash 5
Hello,
I'm a beginner with actionscriptig and made a
tree wich I can drag en duplicate, but it also need to rotate with the mouse.
Ive searched but its hard too find
I hope maybe somebody has the answer
greetings josss
Trigonometry - Rotate Slowly To The Mouse
ive got this problem, i know how to check the angle between my object and the mouse, but i dont know how to make it rotate slowly to it...
i tried this codes:
ActionScript Code:
//first method:onClipEvent (enterFrame) { this._rotation = (Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x))*180/Math.PI;}//(this one doesnt have slow movement, it was just to know my code was working to detect the mouse angle)
ActionScript Code:
//second method:onClipEvent (enterFrame) { this.targetRotation = (Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x))*180/Math.PI; if (this.targetRotation-this._rotation>6) { this._rotation += 6; } else if (this.targetRotation-this._rotation<-6) { this._rotation -= 6; }}
ActionScript Code:
//third method:onClipEvent (enterFrame) { this.targetRotation = (Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x))*180/Math.PI; if ((this.targetRotation<0 ? this.targetRotation+360 : this.targetRotation)-this._rotation>6) { this._rotation += 6; } else if ((this.targetRotation<0 ? this.targetRotation+360 : this.targetRotation)-this._rotation<-6) { this._rotation -= 6; }}
ActionScript Code:
//fourth method:onClipEvent (load) { this.rot = this._rotation+360;}onClipEvent (enterFrame) { this.targetRotation = (Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x))*180/Math.PI; if (this.targetRotation+360-this.rot>6) { this.rot += 6; } else if (this.targetRotation+360-this.rot<-6) { this.rot -= 6; } this._rotation = this.rot;}
none of them worked
can somebody help me??
Rotate On Axis With Mouse Easing
I have a mc that I want to continously rotate, I want it to rotate in whatever direction the mouse is from the center of the mc. If the user pulls the mouse out I would like for it to speed up and slow down accordingly.
If this is not possible, I wouldnt cry.
Any way when the user goes over a desiginated area I would like for the motion to stop until they pull away again.
How would I go about doing this.
I've seen this thread but don't understand where to attach the script, and I also need the stopping script.
http://www.kirupa.com/forum/showthre...mouse+rotation
Case
Rotate Movieclip On Mouse Press
HI all,
Please help me to achieve this.
I have attached my fla. I want rotate the mc by Mouse drag. But its get some of the jerk, So plz find out my fault and give the solutions
Please.... Its very urgent....
Regards,
Suresh J David
How To Rotate An Object With The Mouse Cursor
Hi,
my flash skills are just basic so I´m asking for some help here.
I have to realise a calendar. The hole thing looks like a analogue clock. All days are distributed around a circle. In the middle is the watch hand like pointer. My Problem: The user should be able to rotate the pointer to the current day. I hope this explanation was clear.
How could this be done?
oerdec
edit: I have Flash 5.
Using Mouse To Make 3d Rotate Diff Directions
hiya, wondering if anybody knows how to make it so that when the user mouses over a animation it changes the direction of a spinning box that i made with swift3D..
i have 2 spinning boxes, one clockwise, one counterclockwise. does anybody know the action-script to use or how to set it up so that when they mouse over it moves the box the other way?
thanks!
dross
Rotate With Ease To A Point Using X, Y Mouse Coordinates
I'm a bit of a beginner when it comes to programming actionscript so here is what I've run into. I've made a makeshift compass and when you roll over the compass I want the needle to follow the mouse cursor, while at the same time there is another mechanism attached that twists to the category depending on mouse position. This much I have programmed into the movieclips. Now what I need to add to the code is the bit that makes the compass needle ease back to whatever category you are at once the mouse leaves the circle (the compass). I would assume that you would set everything up on a mouse coordinate system and then reset the rotation of the needle once the mouse leaves the circle, but I just don't have the know-how to figure it out. I would appreciate ANY help as I've been browsing through the forums trying to find something of help but to no avail. Thanks guys!
Movieclip Rotate On Mouse Cusor Movent
is there a way to make the obect rotate from the mouses movement similar to gun turret on a tank ,, or just get the movieclip to rotate would be a start , the script is not sure
shooter.onEnterFrame = function(){
if(_xmouse >= movieclip){
//rotate
}else if(_xmouse <= shooter){
trace("no");
//dont rotate
}
}
|