Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Mouse-follow Rollover?



hey there, board...

god it is cold in england. but anyway-

could anyone point me in the direction of a quick route to creating a rollover that appears and follows your mouse, then disappears when you rollout? (using flash MX at the min)

i have bodged together a version using startDrag and stopDrag - it follows, but it doesn't disappear and also it creates a copy of itself for some reason...

cheers for any help

lou



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-25-2002, 07:07 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Rollover, Follow Mouse
Hi, I've made a links page, and i want to have small informations boxes pop up and follow the mouse while im holding over this link.

I've seen the effect all over the place, aqnd I hope its not to hard.

I've searched around, but I can't find it: I dont have much time, couse I've got a deadline coming up.

I'd be pleased with fast answers! Thanks

Getting 'rollover' To Follow Mouse
Hey there lovely clever ppl (butt-kissing should help)...

Please have a look: http://www.fishgraphics.co.uk/menuidea/

This is just something I threw together to demo what I want.

That red keyline, I want it to follow the mouse. There will actually be about a dozen links on the left of the page and they will be static. i want it so that you roll over a blurred bit of text and the red box follows the mouse (obvously sticking to the left of the sreen) to bring the text into focus.

How can I do this? and can I still make the red box a mask for the underlying layer if the red box is animated?

Any help mucho appreciated, amigos.

Matt

On Rollover, Mc To Follow Mouse?
belive me, i searched to no prevail.

what i'd like to see happen is on my rollover of a button, a mc would appear and follow the mouse (while it is still over the button), on rolloff, the mc would disappear.

i just dont know the actionscript...

help, thanks!

Mouse Follow And Rollover Buttons (or How Did I Do What I Did)
I posted this prior on the newbie list but they couldn't help me...

while working on this site, http://www.libertycity.org/NewLook/nu_index.html my machine crashed taking with it most of the .fla scripting that I had done. anyway, I'm back up and running with it, . The mouse follow part (that big red thing) works fine but I cannot make those rollovers roll. I did this myself, which means it can't be too difficult. As a matter of fact it has to be a really simple solution, but apparently I mixed just enough savant with my idiot to stump myself.

if you want the .fla to look at you can download it from http://butchross.com/idiotspeaks.html

Thank you.

-Br

On Rollover, Movie Clip Appear And Follow Mouse?
Can anyone help me with this. I want a movie clip (specifically, some text in the form of a MC) to appear and follow the mouse when it rolls over a specific area and dissapear on rollout. can anyone help?? thanks!!

Stopping A Follow Mouse Function On Rollover Or Release
Hey Gang,

I'm trying to create a menu bar that follows your mouse vertically. I was following this tutorial:. http://webdesign.templatemonster.com...ouse.1244.html
but I can't seem to figure out how to stop the toolbar from following after rolling over or clicking on the movie clip. I also wanted to find out if I could adjust where the movie clip seats when it meets the mouse, as it seems to get stuck in a non-clickable area. Can anyone give me a bit of insight as to what I need to do to achieve this? Thanks in advance!

This is what the script looks like:.

Quote:




toolbar.onEnterFrame = function() {
var yMouse = _root._ymouse;
if(Math.abs(xMouse - this._x) < 1) {
this._y = yMouse;
} else {
this._y -= (this._y-yMouse) / 6;
}
}







Jeff

PS: if this is in the wrong section, sorry in advance!

Button(rollOver) Makes Movieclip Follow Mouse
The title basically explains it.

I have 2 movieclips.

One is base (border)- on rollover, Pop is supposed to follow the mouse

The other pops up when rolling over border (Pop)- _alpha is set to 0 when rolled out of border

Border Actions:

ActionScript Code:
on(rollOver){
    _root.Pop._alpha=100;
    _root.Pop._x = _xmouse;
    _root.Pop._y = _ymouse;
    updateAfterEvent();
}
on(rollOut){
    _root.Pop._alpha=0
}

My question: How do i have Pop follow the mouse, on(rollOver) of border?

Mouse Follow/stopfollow After Mouse Leaves Object (with Ease)
well, i think the title covers me entirely, i would like some help with a script.
The problem is, i have a scene with objects that at first they are static, when the mouse comes in and makes a move-over the scene and some objects,i have assigned multiple collision to the objects, i want when the mouse moves over a object, the object to follow the mouse,while colliding to all other objects and after a while i would like as the mouse moves away, the following to stop and the objects to return to its original spot with ease.

I know that this is a big one, but i would like some help if i could get

Detect Mouse _x & _y Attach Specific Clip And Have It Follow Mouse
I'm trying to make a clip that will have another clip attached (eventually it'll be a mask) when you roll over it. I want the mouse positon to be determined on rollover and a different clip (with different registration point) to be attached depending on which quadrant you rollover first. IE- you rollover the lower left quadrant of the mc first so an mc with an upper right registration point is attached and follows the mouse.

basically I want it to look like you're pulling a mask from out of nowhere onto the main mc from whatever corner you start on... (make sense?)

i'm trying to reconstruct what you see here (http://www.mullerphoto.com/)
this is the first baby step!

anyhow, here's my AS and i'll attach the .fla any help is great! I have the actionscript dictionary and am not afraid to use it, I just need help with the mechanics of how to actually do this (i.e.- which methods, properties, etc. to utilize) thanks!


Code:
leftfunction = function(){
if (patch._ymouse <= 100){
llowerfunction;
}else{
//this function starts the maskclip coming in from the upper left with a lower right reg point
_root.patch.attachMovie("lowerright", "lrclip", 1);
lrclip._x = _root.patch._xmouse;
lrclip._y = _root.patch._ymouse;
}
}

llowerfunction = function(){
//this function starts the maskclip coming in from the lower left with an upper right reg point
patch.attachMovie("upperright", "urclip", 1);
urclip._x = patch._xmouse;
urclip._y = patch._ymouse;
}

rightfunction = function(){
if (patch._ymouse <= 100){
rlowerfunction;
}else{
//this function starts the maskclip coming in from the upper right with a lower left reg point
patch.attachMovie("lowerleft", "llclip", 1);
llclip._x = patch._xmouse;
llclip._y = patch._ymouse;
}
}

rlowerfunction = function(){
//this function starts the maskclip coming in from the lower right with an upper left reg point
patch.attachMovie("upperleft", "ulclip", 1);
ulclip._x = patch._xmouse;
ulclip._y = patch._ymouse;
}

_root.patch.onRollOver = function() {
if (patch._xmouse <= 150){
leftfunction;
}else{
rightfunction;
}}

[F8] Follow The Mouse - Stop Mc At Location Of Mouse On Click
I have an mc that follows the mouse a certain distance on the x in both directions and then eases to a stop when the mouse gets a certain distance.

What I need to do is to have the mc stop on button click at the x position it is at on click. Then, when another button is clicked the animation continues from it's stopped location to the new mouse location. All with easing of course.

Here is the code for the mouse tracking:

Code:
onClipEvent (load) {
speed = 3;
}
onClipEvent (load) {
stageWidth = 700;
imageWidth = 615;
}
onClipEvent (enterFrame) {
destx = (stageWidth-imageWidth)*(_root._xmouse/stageWidth)
_x += (destx-_x )/speed;
}

Any help would be greatly appreciated.

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.

Changing AS So Mouse Follow Is Switched To Mouse Repel?
So I'm using the .fla attached as a basis for an image scroller (thanks TheCanadian!) and I was just wondering what the process would be to invert it so the "follow" MC is being repelled by the mouse, rather than attracted.

Here's the code for quick reference...

"follow" is the MC following the mouse and "bounds" is the area in which "follow" can move freely.


Code:
follow.onEnterFrame = function() {
this._x += (Math.max(bounds._x + this._width / 2, Math.min(_xmouse, bounds._x + bounds._width - this._width / 2)) - this._x) / 5;
this._y += (Math.max(bounds._y + this._height / 2, Math.min(_ymouse, bounds._y + bounds._height - this._height / 2)) - this._y) / 5;
};
Thanks!

Mouse Follow With Delay When Mouse Over In Certain Area - HELP
Hi actionscript-gods!!!

I got a navigation bar and want a followmouse-object slide along on top of it with a little delay (delay not built in yet) as i move around my mouse in the navigation area. (in adition the object fades out when you don't move the mouse - but that part works and is not important here) My problem is that the object simply won't follow the mouse!!! I hope someone can help me...

Code explanations:

followmouse object = fader
container movie for fader = fadercontainer

Code for first image in _root:

var timeOut;
var maxTime = 2000;
function fadeUp () {
with (fadercontainer.fader) {
if (true == mouseMoved) {
if (_alpha<101) {
_alpha += 10;
} else {
mouseMoved = false;
timeOut = getTimer()+maxTime;
}
}
}
}

Code for fader:

onClipEvent (load) {
_alpha = 0;
function fadeDown () {
if (_alpha>0) {
_alpha -= 10;
}
}
}
onClipEvent (enterFrame) {
if (true == mouseMoved) {
_root.fadeUp(this);
setProperty ("_root.fadercontainer", _x, "_root._xmouse");
} else {
if (getTimer()>_root.timeOut) {
fadeDown();
}
}
}
onClipEvent (mouseMove) {
if (_root._ymouse>66 && _root._ymouse<110 && _root._xmouse>172 && _root._xmouse<689) {
mouseMoved = true;
}
}


Thanx in advance,
Ralf

Mouse Trailer To Follow Path Instead Of Mouse
I need help taking any old mouse trailer and having it follow a predetermined path (like a simple rectangle) instead of following the mouse cursor. I'm very new to flash and would love to be shown how to do this. I'm not even very clear on how you get a mouse trailer to work let alone disecting it and having it follow a path. I really just want to start with a black background, animate the process of drawing a rectangle, then follow the rectangle with an animation of sparks (I've seen some mouse trailers like this) of some sort (kind of like you're cutting a piece out with a blow tourch), then have the center of the rectangle fall away revealing a mask where I can show a scrolling slideshow. Easy right?! Well I don't think so and I could sure use the help!

Thanks in advance,
Tim

Cant Get Hide Mouse Follow Mouse To Work
I used a tortorial on making mouse cursors and mine will follow the mouse until I click one button and then it sticks and does not move, but my invisible mouse is active you just cant see where your draging it...!!!

any tips??

RollOver Action. I Need It To Stay In RollOver Mode When Mouse Is Off.
I have a movieclip with this action attached:


PHP Code:



on (rollOver) {
    loadMovie("logo_intro.swf", "bottom_logo");








When I roll over it, it loads the movie correctly. Yet, How do I get the movie to stay once the mouse is off ite movieclip/button area?

Follow Mouse..... Help, Please
Hi,

I want to try this effect. Can anyone help me?

I have circular buttons.
I change colors of the buttons on mouse over. I also have a bigger circle(unfilled) which sits on one of the buttons. Now, If I move my mouse on any other button, the bigger circle should move and sit on the button where the mouse is pointing. (I don't want the bigger circle to trace the mouse throughout the screen.)

How do I do this? I am new to scripting in Flash. Does it require lot of scripting?

Abhigna

Mouse Follow
Hey,

How can i make an arrow follow my mouse on a vertical line. It can only stay attached to that line though?

L8

Mouse Follow
I have a MC that contains the onClipEvent (enterFrame)action
along with script for a rectangle to follow the mouses position along the x axis. This works, but how do i set parameters to keep it within a box and only follow the mouses position when it enters that box? Hope thats not too confusing. Basically i want the rectangle only to move when the mouse enters the specified hotspot and restrict the rectangles x movement to this hotspot. All help is creatly appreciated!

Follow Mouse?
hello,

I want my mouse, when rollovered a image, to show text about it and follows it around....., how can I do this?!?! thanx!

Follow Mouse Help :(
Hi

I want to make a movie clip follow the cursor but only in a vertical direction and the item must not be able to move horizontal. If the cursor moves from left to right nothing should happen until the cursor is moved up or down.

I have flash 5, can anyone help?

thanks

Mouse Follow?
How do I make one of those things that follow the mouse around when you move around the flash? Mouse trail type thing that flys around the mouse... or whatever.. ha... sorry im not very descriptive.

Mouse Follow Nav Bar
Pls help

I have this arrow which i wish to move from left to right according to the mouse location and stop following when the mouse moves to a certain location. Therefore I tried adding the following to the arrow symbol


Code:
onClipEvent (enterFrame) {
startDrag(getProperty(_x, _y), true, 0, 389, 550, 389);
}
However, since I used the startDrag script but didn't end with a stopDrag script, I cannot do anything in my movie as it is still dragging. So I thought of changing it to the following:


Code:
onClipEvent (enterFrame) {
startDrag(getProperty(_x, _y), true, 0, 389, 550, 389);
if (_x <= 379) {
stopDrag ()
}
}
But now the arrow does not move but I can click on buttons and such. Can anyone please help me modify it so that it works but does not do anything to my other objects?

Thanx a milliion!

Follow Mouse
ahhhhh, I really need help. I want a button, when rolled over, will have a text box follow the mouse, but when you rolled out the box stops following the mouse and it disappears. any help is appreciated!

Follow Mouse FX
Hi folks;

i hope you can help me out on this. I'm currently develloping a new menu for my website and i want some nice animation in it.

This is what i want to do: I have a trusstower and sleeveblock. This sleeveblock should "follow" the mouse (but only up and down!!) as the user moves the mouse from topic to topic.

So, can I combine the StartDrag script with a motionguide? How would you do it?

Thanks in advance
sentencedfan

btw. if you wanna know, how the menu looks like now, come to http://www.fivestyle.de

Mouse Follow HElp
I have a menu of buttons. I have an arrow that I want to move up and down but only when the mouse is over a button. Example the user rolls over button one the awrrow moves along the x axis and comes to rest at the user's selection, The user moves to another bustton the arrow slides down to that choice and so on. ANyone one with some ideas

Follow Mouse
Hi

I have made a simple "follow the mouse" swf.

The MC works just great. I have also added two output windows that show the current position of the MovieClip.

Now here's the problem...My movie size is 650 x 400 pixels...but the readout is in 4 digits...what exactly is happening.

If its of any help, here's the code:


Code:
movie_clip._x = _xmouse;
movie_clip._y = _ymouse;
XPos = getProperty ("movie_clip", _x)
YPos = getProperty ("movie_clip", _y)


Thanks for any information...

Tootles

RanTen

Mouse Follow
hi there
plz i have a serial of buttons and i want when i roll the mouse over the button zone i want a little arrow follow the mouse under the buttons (i hope u get it)
like in http://www.macromedia.fr

if i use
_x +=(_root._xmouse-_x)*.3;
_y +=(_root._ymouse-_y)*.3;

(3 is an example)

so it will follw the mouse in every direction and in every place but i want that the arrow does'nt exist if i don't roll the mouse over the button zone
in http://www.macromedia.fr theres an example
thx in advace

Bar Mouse Follow
Ok I want to make my bar thats a movie clip folow my mouse.

Does anyoen know the actionscript for my bar movie clip?

Thank You
David

MC To Follow Mouse
Is it possible to have a MC follow the mouse only on a y axis and only when the mouse is in a certain area or over the MC.
Any help would be appriciated
Thx

Follow The Mouse
greetings,

im trying to do a crazy website (with wiered eyes follows the mouse!

how u can make something that follows the mouse (like in oddcast website)????

thanx

Mouse Follow
i made a ball with another small ball in, the small ball looks at the mouse but it must stay in the other ball!
it's maybe a bit complicated explained but just see the fla and you understaind i suppose.
thx

Follow The Mouse
Can someone lead me to someplace or send me a file of possibly an animal or person thats head moves with the mouse and the eyes follow. I kinda get what to do, but I keep missing something. I just want some simple file I can break apart and see what Im doing wrong.

Thanks.

Follow Mouse ?
Hi, i'd like to have something that follows my mouse, not a regular dragger, one with delay, you know what i mean, ...

Mouse Follow
Does anyone know how to have an object follow the mouse in a specific area. Not the whole flash document. Here's an example: http://www.summitprojects.com/

Tag That Follow Your Mouse
can anybody teach me how to do this thing?
do u see the girl on the right?
when your mouse is over that girl
theres this small tag folowing your mouse
saying "<<just drag the bar, sweetcheeks"
http://www.driftlab.com/
anybody can teach me how to do this?
thnx^^

Tag That Follow Your Mouse
can anybody teach me how to do this thing?
do u see the girl on the right?
when your mouse is over that girl
theres this small tag folowing your mouse
saying "<<just drag the bar, sweetcheeks"
http://www.driftlab.com/
anybody can teach me how to do this?
thnx^^

Follow Mouse
Hi !!
I have a clip which follows _ymouse,
but under the condition that _ymouse hitTest another clip.
I don't know....something doesn't work

I posted the fla

bye

Follow The Mouse
I'm trying to develop a menu bar like the one found at www.hugosalon.com.
When the mouse enters the menu bar area, which is spilt into sections Gallery, contact, etc. there is a small image that follows the mouse along the top of the menu bar to indicate which section to enter.
I've seen this effect everywhere but just don't know where to begin.
Thanks for the help if there's anyone willing

Follow That Mouse
I'm building a site at the moment for which there is an early page at

www.mystery.co.uk/londonwall

Anyway, I want the 2 little brown squares which currently sit in the lower right hand corner to move up and across in the right and bottom margins following the mouse, kind of like the ruler markers in something like Photoshop that follow your mouse across the document.

Ideally I'd like to make this movement a little elastic, but my Actionscript is pants so I wondered if anyone here could help?

®

Mc Follow Mouse
Hi, i'm trying to make MC follow the mouse. I'm actually following a tutorial, but i still can't get it to work.

here's what i have:
Frame 1 of MC:
shapeX=_parent._x;
shapeY=_parent._y;
targetX=0;
targetY=0;

Frame 2:
targetX=_root._xmouse;
targetY=_root._ymouse;
distX=targetX-shapeX;
distY=targetY-shapeY;
shapeX=Math.round(shapeX+(distX/5));
shapeY=Math.round(shapeY+(distY/5));
trace(targetX);
trace(_root._xmouse);
_parent._x=shapeX;
_parent._y=shapeY;

Frame 3:
gotoAndPlay(2);

Right now the MC doesn't catch up to the mouse when i move it, and i can actually increase the distance between the mouse and the MC when i move it. When i take out the 5 in frame 2 and just have shapeX+dist I get some really weird oscilating thing?
If anyone could help me that would be great.

Follow Mouse Help...
I'm extreamly curious as to how http://www.usefulnoise.com got the little things on the edges of the site to follow the mouse... i tried making a crosshair then covering up everything but the edges...this worked execpt when it would follow u to the edge you'd see the whole crosshair... do u get what i'm trying to say. anyway i've been fooling around with this for a few days now.. any enlightenment?

Follow Mouse
Check the attached file,

As you can see the rectangle mouse that follows the box goes of the end of the screen on the left, how can i confine it so that it goes no further then the button "General Fixings", and the same on the right.

Cheers

Lee

Mouse Follow For Nav Bar
Hi...

I have a nav bar I've made: http://notapplicable.co.uk/Untitled-1.swf I'd like to get the arrow to follow the mouse when u select each option with some degree of 'springyness' as it jumps to the center of each one (as it is atm on 'news'). Then once a selection has been made, the arrow will remain on that option. Make sense?

Seasonz greetinz to all...

D

Follow Behind Mouse.....
Hello all,
I have been looking for a tutorial, or even just an example that i can look at of an object that trails slightly behind the mouse, and then catches up when the mouse stops. Im sure most everybody has seen an example of this some time or another, but i am having trouble finding one.
If somebody knows of a tutorial that could help me out, or a .fla example, it would be MUCH appreciated!
Thankyou

Follow Mouse?
I am creating navigation that has a "frame" that follows the mouse.
The navigation is loaded as a second swf. into my main swf. My problem is the "frame" follows the mouse even if I am outside the area of it's swf. Any direction to combat this would be greatly appreciated.

Here is my somewhat working example

http://www.homebeautifuldisplays.com.../flashtest.htm

How To Have Mouse Follow ?
how do you have your mouse follow as it does in the motion design menu on this site:
http://www.mn8studio.com/

Follow My Mouse
Hi gang
Are there any basics out there or any "shell templates" that allow you to get creative with mouse trailers?

I am essentially trying to create some kind of subtle mouse interactivity like the ones listed on the sites below:

http://www.jeedub.com/ get in and click on INFO -- This one the guy's eyes always follow the mouse

http://www.thanea.com/ars/ (click on CONTACT) -- This one, these three plant like looking things waive back and forth with the mouse motion

http://www.exopolis.com/site/ enter site, wait until it loads. -- This one there are a bunch of little images that when you take your mouse through them, they spread apart...

So, I am assuming that all of these must have a similar way of coding them right? If someone could let me know the basics to get started it would be greatly appreciated. Tutorials, code snipets, links, fla's... anything would help

Follow The Mouse
I'm trying to design a menu where a box follows the mouse to the menu item when the mouse enters a certain area on screen. I've read through several tutorials on this site and so far I can get the box to move AWAY from the mouse when the mouse enters the area but I cant get it to move TO the mouse.
Here's my Script:

onClipEvent(enterFrame) {
if (_root._ymouse > 470 && _root._ymouse < 510) {
_root.xChange = Math.round(_root._xmouse-this._x);
_root.xMove = Math.round(_root.xChange/10);
this._x += _root.xMove;
}
else {
_root.xChange = Math.round(this._x, 807.3);
_root.xMove = Math.round(_root.xChange/10);
this._x += _root.xMove;
}
}

I'm trying to get my box to slide left and right under the mouse as it moves between the 470 and 510 area on the screen.
Any help would be greatly appreciated.
Thank you

Copyright © 2005-08 www.BigResource.com, All rights reserved