actionscript 3 - Listen if 2 events are dispatch -


is possible listen if 2 events dispatch ?

example :

when puzzle = true --> dispatchevent(new event("the first"));

when puzzle2 = true --> dispatchevent(new event("the second"));

and :

do if "the first" dispatch if "the second" dispatch

and thing if "the first" , "the second" dispatch.

the event structure independent of each other. 1 event can dispatched another.

puzzle.addeventlistener("the first", handler1); puzzle2.addeventlistener("the second", handler2); 

alternatively, have both events trigger same function.

puzzle.addeventlistener("the first", handler); puzzle2.addeventlistener("the second", handler); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -