What I make usually is have an array and set different levels of mouse blocking.
Example:
I have the menu, the contents, and lets say something else that appears on top of everything called animation.
mouse_block = new array(false,false,false)
The first false corresponds to the menu, the second to the contents, etc.
So, I check on every clickable mc if their level is false or true.
on(press){
if(mouse_block[1]){
//do what ever it is suposed to do
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
My problem is that I need to write that on every movieclip…
Can you point me a way of optimizing this?
I thought of using the prototype, but from what I know you can only create new methods an properties.
Is there a way of modifying the mouse events like onPress or onRollOver?.. or create your own mouse events using those as a starting point?
Thanks