Skip to main content
Known Participant
July 15, 2006
Question

MovieClip Behaving Erratically

  • July 15, 2006
  • 2 replies
  • 440 views
ok - I have a listner set up with a mouse event so when i move my mouse over an area, a MC fades in.

problem is, it behaves erratically, sometimes i have to keep my mouse over the area for a few seconds before it finally fades in, but sometimes it fades in quickly (as intended)

i have other animations going on in the _root timeline, would this hender the mouse listener?

thank you
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
July 15, 2006
yes, there are times when both fadeIn() and fadeOut() are being called repeatedly and sequentially. when one loop executes, the other should be stopped.
hushhurtAuthor
Known Participant
July 16, 2006
one more time, thanks again kglad,

though i dont really get how the code is working, i placed:

myListener.onMouseMove = function() {
if (aHitArea.hitTest(_root._xmouse, _root._ymouse, true)) {
fadeOut();
delete fadeIn();
} else {
fadeIn();
delete fadeOut();
}
};

and it is giving me what i want.
kglad
Community Expert
Community Expert
July 16, 2006
you're welcome.
kglad
Community Expert
Community Expert
July 15, 2006
you should be deleting the previous onEnterFrame loops before starting the next onEnterFrame loop.
hushhurtAuthor
Known Participant
July 15, 2006
im deleting the onEnterFrame loop in the function, do you mean i should delete it on the onmousemove listener?