PDA

View Full Version : Ive confused myself. Again.



FlashFish
February 4th, 2002, 06:31 PM
Ive got an mc that has this scripting on it,
onClipEvent (enterFrame) {
_y = _root._xmouse;
}
which makes it follow the mouse, but what i need now is for the mc to stop moving when the mouse reaches a certain point on the stage. Could a button and tell target do this?

Phil Jayhan
February 4th, 2002, 06:53 PM
Fish,
I don't know, i am sure it's possible. I will be listening in on this one as I would like to also know if you can make it stop by a timer or when it gets out of a certain area. I am sure its possible but don't know how. Perhaps Upuaut or Pom would know the script for that.

pj

thoriphes
February 4th, 2002, 07:20 PM
yell at your computer, or turn it off, then it'll stop following the mouse.

thoriphes
February 4th, 2002, 07:24 PM
hopefully the area you want the mouse to be followed in is a square:

say you wanted the MC to follow the mouse within the range of 100x100 pixels, top left corner of your screen. this would be the script:

onClipEvent(enterFrame) {
if (_root._xmouse > 0 && _root._xmouse < 100) {
if (_root._ymouse > 0 && _root._ymouse < 100) {
_x = _root._xmouse;
_y = _root._ymouse;
}
}
}

that is a very basic script. hopefully you'll understand what that means.

thoriphes
February 4th, 2002, 07:26 PM
what you could also do is take a sledgehammer...or even a simple drill.........................