0 Replies Latest reply on Feb 26, 2007 2:06 PM by xyco45

    Could some one explain to me how Custom Events work?

      I tried looking in the live docs and still it confused me, so then I went searching on the net and found this very lovely tutorial http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/ but still it confused me. The part I am puzzled on the most is that when you create like a event that listens for when your mouse clicks something is setup like addEventListener(MouseEvent.CLICK, eventHandler) etc, etc. And when a mouse is clicked the event is triggered! but if the CLICK constant is just a a string value what is going on behind the scenes that tells it (lets say Flex is talking -->) "okay he/she specified the 'CLICK' constant so I guess this means I will make this event happen only when the mouse clicks on that particular object" and same with MouseEvent.DOUBLE_CLICK how does it know to trigger this event only when the mouse double clicks on a item. I want to make my own custom events that trigger a particular event based on what a object does, but I just don't understand how to set it up and implement it.