I'm currently creating a navigation bar for a project using flash cs4, action script 3.
As you can see in the picture there is a navigation bar, and inside this bar there is a small rectangle and two lines (located at the first located at x=25 and the second x=555).
I want the rectangle to follow the mouse but be slightly delayed (elastic?).. Another requirement is that rectangle only moves on the x axis and therefore the y axis doesn't change(it is y=68), but doesn't move further than the two lines. The rectangle is a movie clip and its name is 'rectangle'
I pretty much want it exactly the same as this [URL] except the ball can only move on the x-axis and in between the two lines.
I have an mc, that i need to have follow the mouse on the x axis. I have that just fine. But my problem is that i need a certain frame within the mc to play if the mouse is at a certain area of the stage. For example, if the mouse is at the x coordinate of 235 to the left, frame 2 of the movieclip will play. I uploaded just a test fla that i was practicing on.
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.
draw a line from the bottom left corner of a movieclip to the mouse pointer. I need the line to be "elastic" because both the movie clip and the mouse pointer will be moving. I've tried various things with lineto but have failed to get the line to redraw and follow the pointer.
I've got a simple function that makes a movieclip drift over to wherever the mouse is.. It's a nicer effect than just making the mc._x and mc._y = _root._xmouse and _ymouse.. The problem I'm having is that if the mouse is in the top corner of the screen when the movie clip loads, the mc zips off to that corner too. I want the mc to stay in the middle of the screen when it loads and to move in the direction of the mouse when the mouse moves.. The mc still needs to be able to be moveable accross the entire width of the screen however.
I have tried storing the _xmouse value at the time the movieclip loads, and then offsetting my function with this value - which has the desired effect, but prevents the mc from being able to be moved all the way to the edge of the screen.. Hope that makes sense - Has anyone got any solution to this?
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.
i have an MC (hand) that ive made to be draggable. once the hand is released it should return to its original position....but of course, it doesnt. the code is a slight variation of some i found a while back and have kept in a folder. first frame on code layer in main timeline Code:[code]
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?
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.
...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.
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...
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.
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"
I have this kind of menu structure design (see image attached), and the way It needs to work is when the mouse goes close to a topic it follows it and when the mouse is a certain distance away it springs back to its orginal place?
I am trying to have a flashlight follow the mouse from it's pivot point. Rotating from its registration point, 180 degree rotation. Also have it move back to place if the mouse is off stage.
I found several tutorials that work great for having movie objects follow the mouse but I haven't been able to find one that restricts it to only a certain area. This is one of the tutorials that I was looking at: http:[url].......What I basically want to do is have this hanging lamp tilt either left or right depending or where the mouse comes from.
I have a graphic replacing the mouse cursor and I'm having it so that when the user goes over a MC (called hitSquare in this case) the cursor graphic moves to a certain location on the stage, then returns to the location of the real mouse position.[code]The problem with this is that during the 0.5 seconds that it takes the graphic to return to the mouse position, the user can still move the mouse, so it actually goes to different co-ordinates and when the user moves the mouse after the 0.5 is over, the cursor just jumps to the new location.How can I make it so that the graphic smoothly follows the mouse, (even if it's being moved and has to update in real time) and then returns to the standard mouse follow code (cursorMC.x = mouseX; etc) once it's met its final destination?I take it this requires some "mouse trail" code that gets removed once it's caught up with the mouse.
I am trying to make a menu bar that when the mouse moves around from button to button it has a bar that follows under the text.I have found scripts for making a MC follow a mouse around the screen but I cant find anything for what I need.
I am working on a project that involves having a FollowSpot following the mouse until the user click on a button. Beeing fairly new to Flash, I searched on the Internet and came out with a few ideas but I could not find exactly what I was looking for. I have included the code that I now use as a test bench: Everything is included on one frame and it obviously has to loop until a selection is made.
In my latest project I'm trying to have a line follow my mouse, I succeeded doing this with the LineTo and MoveTo functions this is what i have come up with [URL]if you will play with it for a while you will notice that sometimes the line is burned on the screen and just stays there,Another thing i want to achieve is that the line will be created out of a movie clip and will have animations and graphics in it insted of just plain color.
i have a plane that gonna follow the mouse but i dont want the plane to stop when it reaches the mouse position , instead it needs to continue its wauy then follow the mouse when it moves again this is what i have so far package
I really didn't want to have to post this question on any forums because it would be hard to explain, but I have spent far too many hours trying to figure this out so I have no choice.his is what I want to do: I want to have a little ball follow the mouse but not go into any walls at all. Here is a swf of my current attempts at doing this:As you can see, if there is a Y obstruction but not an X one, the ball will still follow mouseX, and vice-versa. However, there are some glitchy limitations as to having the ball follow mouseX when there is a Y obstruction and it must go over some hills to get to mouseX.Also, the code currently only checks to see if the four points around the ball are sinking into the walls, but it would be nice if it used more complex sphere calculations, or maybe 8 points
how do I make it so that the an object only follows your mouse between certain points? I have a square with the code startDrag("", true). Then I put an if then statement saying...
i just read the tutorial on mouse follow with easing.i've been trying to work on it not that its that hard but what i've been trying to do is to make an object get to the mouse with any easing at a constant rate probably i'm skipping on some concept, but i'm gettin into line equations n stuff .... which is makin the code really comlpicated and still there are some hiccups in the code [code]in this code , division with the constant "speed" is what results in the easing but i'm talkin about the object approaching the mouse at a constant rate
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,