To make that a little clearer, create and event listener for the stage so that when the mouse gets cliked it triggers a function. That function, the sets up a listener for the enter_frame event. The function that runs on the enter frame event checks every clip to see if the mouse is over it. Which, if true, will turn it's alpha to 0 (or whatever you want it to do).
Then make sure when you release the mouse with a mouse_up, you remove both listeners.
Main Topics
Browse All Topics





by: section25Posted on 2008-12-11 at 09:28:52ID: 23150312
The problem is that the MOUSE_DOWN event only fires once (when the mouse is clicked). So whatever clip is under the mouse pointer at that time gets the event triggered for it. So if you hold down the mouse button and move the mouse, none of the rolled over clips will receive the event becuase it has already been fired.
So basically what you need to do is have a MOUSE_DOWN listener for the whole stage (not the individual movie clips), and when then check the position of the mouse to see if it is over the position of one of your movie clips. It will be a lot of checking and fairly time consuming, but that seems like the only way to do it, since the check will happen for every frame rather than just the one time the button gets pressed.