The problem with using proxies is that you circumvent compile-time checking. I find that there are better ways of dealing with such situations. Three suggestions:
1) In the handler function, look for a property of the event target. This works for most cases where you need a handler function to react differently in a given situation. (For example, different buttons could carry an "index" event that the handler looks for via MyButtonClass(event.target).index.) 2) Differentiate the event type and have one handler deal with several event types. This is not useful in cases where you may have an unlimited number of different responses, and generally I wouldn't recommend this as a solution, but there may be some cases where it's appropriate. 3) Create a new subclass of Event with one or more extra properties. (For example, IndexEvent, with an added property, "index".) By the way, I think the AS3 syntax for this:
button.onRelease=myFunction; // AS3
... is actually: button.addEventListener(MouseEvent.CLICK, myFunction); -- T. Michael Keesey Director of Technology Exopolis, Inc. 2894 Rowena Avenue Ste. B Los Angeles, California 90039 -- The Dinosauricon: http://dino.lm.com Parry & Carney: http://parryandcarney.com ISPN Forum: http://www.phylonames.org/forum/ _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com