I am working on a series of puzzle games.
Each piece is a movie clip. When the mouse rolls over a piece, its child object movie clip, called the “rotation mark”, appears on the piece. (This is to allow the user to rotate the piece by clicking on it). When the mouse leaves the piece the rotation mark disappears.
I accomplish this by way of ROLL_OVER and ROL_OUT event handlers on the piece movie clip. On ROLL_OVER I simply set the rotation mark movie clip’s *visible *property to true, and on ROLL_OUT I set it to true.
Here is what it looks like. (The mouse cursor doesn’t get captured when you take a screen shot in Windows.)
When the mouse is moved over the rotation mark, inconsistent behaviour results:
-
When I try it with Control -> Test Movie in Flash it still seems to be considered “over” the piece.
-
However when I run the SWF embedded in an HTML file, moving the mouse over the rotation mark results in the piece dispatching a ROLL_OUT event.
(This causes the rotation mark to blink because when it’s gone the piece fires ROLL_OVER, causing it to reappear, which causes the piece to fire ROLL_OUT again, ad infinitum.) -
When I try it with Debug -> Debug Movie in Flash I get the same result as 2 above.
Why are these different? What is the expected behaviour.
One thing you may note is that all the MCs here (pieces as well as rotation mark) are loaded assets from external library SWFs. Before, when I had them all in a single SWF that was running I was getting the same results as 1 above in all cases. It was after I changed my design to have use a shell SWF and external libraries that this inconsistent behaviour began.
Any thoughts or ideas?