ActionScript 3.0 :: Make A Movieclip Follow The Mouse?
Jun 4, 2010
Is there anyway to make a movieclip follow the mouse. I have a menu, as a movieclip and when i roll over the menu i want something to pop up where the mouse is that says 'click & drag to scroll' my main menu is called: container_mc the movieclip i want to appear i have exported it for actionscript and is called mouseovermenu.This is the AS3 i have so far:
Code:
container_mc.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
container_mc.buttonMode = true;
container_mc.useHandCursor = true;
[code]....
At the moment the pop up appears when i roll over but it dosnt follow the mouse. Also, i am getting more than one instance of the rollover movieclip appearing.
View 2 Replies
Similar Posts:
Apr 29, 2010
I have this code is AS3
Code:
var xMouse = mouseX;
var yMouse = mouseY;
[Code]...
But unfortunately, the ship does not follow mouse rotation. The ship only rotates with respect to the mouse when you move the ship, not when you move the mouse.
View 1 Replies
Jun 13, 2011
I'm not sure what to call this particular way of making the movieclip follow the mouse.When the mouse moves up, the movieclip plays through the frame. If the mouse moves down, the movieclip plays in reverse? I think that's how it works.
View 2 Replies
Apr 21, 2004
make eyes move and follow a mouse on the _x and _y axis, but the eye needs constrained with in an eye socket.I have used two mc to constrain while mousedown.
// mc_1
onClipEvent (enterFrame) {
bounds = getBounds(this);
[code].....
View 2 Replies
Oct 22, 2004
sorry for this dumb one i am having a blond day, how do i make a movie clilp follow the mouse at all times without ease or anything fancy, i found lots of documentation of fancy things and was unable to strip them down to just a simple follow,
View 13 Replies
Feb 15, 2010
How can I make a MC to follow the mouse?
View 1 Replies
Oct 22, 2004
how do i make a movie clilp follow the mouse at all times without ease or anything fancy, i found lots of documentation of fancy things and was unable to strip them down to just a simple follow,
View 13 Replies
Jun 14, 2009
i am trying to make the tooltip follow my mouse, i did the motion but i do not know if it is the correct way. the problem is when i rollover the movie or button and after the tooltip appears, the tooltip blinks when i move my mouse around the objects correct the code
[Code]...
View 7 Replies
Apr 3, 2010
I need to know the action script to make a movie clip follow my mouse on the x axis only, you see it used a lot in banners.
View 7 Replies
Dec 28, 2010
Is there a way that I could make a symbol/button follow my mouse without having to drag it? for example, a car following the cursor.
View 4 Replies
Sep 15, 2011
how to make the camera follow my hero (mc), I think the problems involve me using the mouse to move my player instead of the keyboard. This is my code:
var distx:Number;
var disty:Number;
var gravity = 0.6;
[code]....
The result is my Hero following my mouse and when I click it jumps. But the camera is not following it.
View 2 Replies
Oct 8, 2009
How can i make a circle follow a mouse pointer?
View 1 Replies
Jan 29, 2011
I am making my second flash game, I am still very much a beginner. This time i am trying to make a platformer in the style of fancy pants adventure. To do this i obviously need to make the camera follow my character. The problem is; i simply don't know how. I have yet to find a CS5 compatible solution with my less than good google skills, and so here I am.
View 6 Replies
Dec 1, 2010
I have a mouse trailer which trails pixie dust and would like it to follow a movie clip instead of the mouse. Here is the script I have for the mouse trailer... the mc is named mc_fly.
[Code]...
View 1 Replies
Feb 15, 2010
Imagine we have a MovieClip called "box". When I click somewhere on the screen, I want the box MC to move to that position. So I wrote something like this (just for horizontal movement):
PHP Code:
onMouseDown=function(){moveTo(_xmouse);};
function moveTo(newx){box.onEnterFrame=function(){if(box._x<newx){box._x+=5;
}else if(box._x>newx){box._x-=5;}else{delete box.onEnterFrame;}};}
Now this works to a degree, except that when the box MC moves to the right position, it then proceeds to vibrate on the spot. I thought it was probably because it can never move to the exact position of _xmouse because I'm adding 10 to the x property which is why the condition is never met. However even if I just add 1 instead of 10, I still have the same problem..
View 3 Replies
Mar 12, 2009
I'm fairly new to using ActionScript to move MovieClips around. I'd like to have a movieclip follow my mouse around the screen (like a mouse cursor). I put one instance of the MC on my stage, with an instance name of 'a', without quotes. (identifier is 'box', class is 'boxClass', without quotes.)
[Code]...
This doesn't work, which should be apparent since I'm posting this. (lol) How can I tell my movieClip to follow the user's mouse?
View 2 Replies
Jul 30, 2007
I'm using the following code to have an MC follow the users mouse based on it's x value. But I'd like to have this inverted...so that if the users mouse goes right, the MC goes left....instead of going right along with the mouse.
Code:
import mx.utils.Delegate;
class Mover {
private var target:MovieClip;
private var limits:MovieClip;
private var ease:Number;
[Code] ......
View 3 Replies
Oct 26, 2009
I found this tutorial [URL] and is wondering if I could limit the area where the clip can follow? I'm planning to have my cartoon's EYEBALLS follow the mouse move.
View 1 Replies
Feb 22, 2009
I have 2 movieclips i want to make the gray movieclip follow the black moveclip that draged by mouse
i attach the project
View 3 Replies
Mar 30, 2009
How would you force a mouse follow movieclip to snap to a x y position if it reaches x y boundaries or perhaps if a button is released the movie clip snaps to a x y position? Of course if the mouse returns to x y boundaries I'd like for the movie clip to follow again.
Right now this is the code I'm using to make the movieclip follow the mouse within x y boundaries:
Code:
onClipEvent (load) {
_x = 0;
_y = 0;
[code]....
View 4 Replies
Sep 30, 2009
As the topic indicates, i'm trying to create a curved path and make a movieclip follow that path up and down with a bit of rotation.
This could easily be done animating the timeline, however I need this to be done through pure AS - as when I mouseOver the MC, the MC need to stop and go to the top. [url]...
View 1 Replies
Sep 30, 2005
i want to make one circle follow the mouse cursor, inside another circle. Similar to an eye looking at the cursor. Ive attached an example.
View 4 Replies
Nov 11, 2010
I am on a tight deadline and looking for the AS3 code of how to do what this company does on their site:URL...However, I don't know AS3.Literally my project requires I recreate the what is shown with the hand holding the sharpie and moving only back and forth restricted to a centered rectangular area at the bottom of the screen.I know how to import the image that follows the mouse to the stage, and to make it a movieclip. Let's say I have named the instance "Image_mc".Does anyone have the actionscript for how to do this? Do you attach it to the object or to a keyframe on a separate actions layer?
View 5 Replies
Jun 23, 2010
I am looking for a quick and simple way of having a movieclip follow the mouse with easing, until it reaches the mouse, at which point I want it to stop. It needs to ease out, so the standard cursorMC.x = mouseX will not do (also because it doesn't update the position of the mouse.
View 1 Replies
Aug 27, 2009
I have created a small flash movie where the eyes of the character follow the cursor. Its based on this one here Only problem is, it only works while the mouse is actually over the movie. Is there any way to increase the sensitive area to the whole screen without increasing the actual size of the movie?
View 1 Replies
Dec 26, 2009
I am using CS3 and trying to get an object to follow the mouse and having a hard time finding a tutorial on this, because all of the ones i have found want me to add the actionscript to the MC, and my version of flash won't let me do that. Flash expects me to attach it to the frame and so the code doesn't work.
View 11 Replies
Feb 24, 2010
...without using the startDrag method. I know I can use code like this inside of a mouse event listener/function:
Code:
objectMC.x=mouseX;
objectMC.y=mouseY;
This code makes the object move with the mouse, but only if I move the mouse very slowly. When I move the mouse quickly, the mouse leaves the area of the object and thus the MOUSE_OVER listener stops listening, causing the object to stop.
View 1 Replies
Jun 1, 2010
I can't find any info on this so I guess I'll just ask. I'm trying to make moveclips that will follow the mouse pointer on MOUSE_OVER but only up to a certain distance then tween back to its original coordinates (preferably with a bounce or elastic ease).I tried startDrag(); on mouse over and that works quit cool but the problem is stopping the drag...
View 5 Replies
Jan 4, 2011
I'm trying to get a little mc to follow my mouse but stop when it gets to the "walls" (borders).
I first tried to test when the mc itself hit that _x value:
Code:
if (this._x <= 88){
_root.mc_go = false;
} else {
[Code]....
but when the mouse leaves the area, the mc does not continue to follow it all the way to the border, it just stops immediately.
View 1 Replies
Feb 12, 2009
Using this code:
[Code]...
I have a compass that is rotating depending on the position of the mouse, however it rotates it from the top left of the stage not the movie clip, how to get the AS to recognise the centre of the compass.. Also, I thought a nice touch would be if the compass had a slight "wobble"
View 1 Replies