Follow mouse

Is there a way to hide the movie clip that follows the mouse when the mouse is not on the movie on followmouseeffects?

Can you explain that a little bi better please ?\rpom 0]

<embed src=“http://topelite.netfirms.com/follow.swf” width=200 height=200></embed>\r\rCan i only show that cross that follows the mouse only when the mouse is on the movie, so it isnt shown when the mouse it out?

maybe you could use \rmouseBounds = _root.getBounds();\r\rif ((_root.mouse_mc._xmouse > mouseBounds.xMax) ||\r(_root.mouse_mc._xmouse < mouseBounds.xMin) ||\r(_root.mouse_mc._ymouse > mouseBounds.yMax) ||\r(_root.mouse_mc._ymouse < mouseBounds.yMin))\r{\r_root.mouse_mc._visible=false;\r}\relse\r{\r_root.mouse_mc._visible=true;\r}\r\rI can’t test it out right now. I hope it is okay. don’t hate me if it is wrong. or won’t work at all - Brian\r\rEDITED: It is not working now, sorry. I will try to figure it out. -Brian

Where do i put that in?\rAnd i think it contains some errors…

Nice script… I didn’t know that getBounds function. I think that it will work if you put () everywhere in your if test. You can put the code inside your clip that follows your mouse, for instance.\rpom 0]

did you come up with a solution?

Oh, I didn’t try !! Did you ? I’ll try later anyway.\r\rpom 0]

bump… I’m gonna try that too… never heard of the _bounds property

Ok, I’m getting crazy. I’m certain I answered that thread somewhere, only not in the good thread. Anyway, the solution is to set the clip invisible whenever the mouse gets to close to the border. Let’s say 5 pixels for instance. Can you do that by yourself from here ?\r\rpom 0]

Its not important, i dont need it, but i need this…\r\rHow do you change to random color each time you roll over a button, or change to red, through actionscript?\r\rOr can i change to another image when rollin over a button?\r\rI want a button where the colors change every time i roll over it.

U can use another MC that detect that if the mouse on it, and so tells the followin MC to be visible or not :\rlets assume that the detection MC called bg_mc, and the other is follower_mc\rput that on the bg_mc\r\rif(this.hitTest(_root._xmouse,_root._ymouse,true)){\r_root.follower._visible = true\r}else{_root.follower._visible = 0\r}

didnt get it to work, can u send me a fla?

Farafiro, that method isn’t really interesting, since a simple on(rollover) would do. About that coor changing thing, I suggest you look at that tutorial on this very site :\rwww.kirupa.com/developer/…mcolor.asp\r\rpom 0]

** Farafiro, that method isn’t really interesting**\r\rwell It might not be so but it solve the problem with an easy way, isn’t it ??\r\r** helpmenow**\rhow can I post a fla here

use only the embed section of code, and click the box below your reply screen that says “HTML”. That will let you post an swf in here. As for an FLA, I think that you can only link to them.

Still can’t do it but anyway here is a link to the fla\r\rwww.geocities.com/a_fayek…pmenow.fla

Fara, you answered my first question about hiding the effect right?\rCool, well, it works.

Sorry Fara,\rI misunderstood what you were trying to do. I thought you were trying to solve that second problem, where the hittest method would be totally unappropriate.\rBut to solve the first problem, well, I guess it’s just the best way ! (I did it differently, but it sucked. Humm…).\r\rpom 0]