At 6/8/08 04:02 PM, Wolfears2 wrote:
Sorry for triple
anyway, I've fixed my last error, but now I can't get back withing the boundaries.
onClipEvent (mouseMove) {
if (_x>=0) {
if (_x<=550) {
if (_y>=0) {
if (_y<=400) {
_x = _root._xmouse;
_y = _root._ymouse;
}
}
}
}
}
onClipEvent (load) {
Mouse.hide();
}
This isn't going to fix anything, but I'm going to point out that it's a lot easier to reduce that to...
if (_x >= 0 && _x <= 550 && _y >= 0 && _y <= 400) {
_x = _root._xmouse;
_y = _root._ymouse;
}
The logical && (and) operator will check for each condition until it finds 'false', so it will do the same thing your code is doing. Just a good habit to get into and will save you a lot of time and grief in the long run.