Log in

View Full Version : Flash 8 - OnRollOver on nested MovieClips



thosecars82
06-20-2008, 05:27 PM
Hello there
I am using Flash 8 and have this problem.
I have a movieclip image called X. Moreover I have another movieclip called Y inside of X. Y covers just part of the total area of X. Both X and Y have defined the onRollOver funtion. The behaviour should be like this: when I put the mouse over X, then the X animation starts and when it ends it shows the movieclip Y in its last frame in which it stops. Now, if I don't get the mouse out of the area covered by X and furthermore, I put the mouse over the area covered by Y, I was expecting that the onRollOver function in Y was called. Nevertheless, Y is not called.
Does anyone how to fix this?
Thanks.

Medyman
06-20-2008, 07:20 PM
This is because Flash doesn't have support for nested mouse events. So you can't assign onRollOver states to movieclips which are inside other movieclips with onRollOver states (or onRollOut or onRelease or onPress, etc...).

The solution?

delete the onRollover of the outside clip, when you mouseover it. And then reassign it when you mouse off.

SkyConstantine
11-26-2008, 01:58 AM
can u be more specific about how to assign and delete roll over?
didi you mean them as listeners or functions?

thanks!