I am making buttons like every website. They have 3 states: normal, mouseover, mousedown
I show all my experiements in the project demo:
The project:
http://miomoe.com/upload/src/up1360.zip
First I bind play("mouseover") to mouseover event,
play("mousedown") to mousedown event,
play("normal") to mouseout event
and you can try this on "Button1", you will notice that the mouseover event override the mousedown event so mousedown frame never show
In order to prevent this I add a variable so when mousedown triggers, mouseover event stops
and you can try this on "Button2", you will notice that this time mouseout event override the mousedown event so mousedown frame never show
In order to prevent this I add a variable so when mousedown triggers, mouseout event stops
and you can try this on "Button3", it looks cool but you will notice that when you keep pressing the mouse left click and move the mouse out of the button, the button is still in mousedown frame because the mouseout event is stopped, and if you release the mouse left click outside the button, the mouseup event will not trigger
I noticed that Rapael javascript does not have such problem. Any thoughts?