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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -