> I’d have to move most of my code to the sound event completion listener than that wold be designing the whole game AROUND the sound. I don’t want to do that. And it wouldn’t seem right to do it that way.
I haven’t looked at your code, but you really ought to consider breaking your “main” code into subroutines. It shouldn’t be hard, just add a function statement at the beginning and an end at the end (and indent appropriately so you can read it). Do this in blocks that make sense, and then your “main” code is just a sequence of calling those functions in the right order. And, if some of them are initiated using events, it’s easy to do that.
Programming using Event Listeners is a completely different style than standard procedural programming. And, IMHO, it’s arguably the “right” way, especially on mobile. Adding a timer or a loop is really a hack, and depends on the CPU speed – imagine if the CPU were 3x faster! Event Listeners don’t do anything until fired, and they will always fire at (or slightly after) the right time.
[import]uid: 54 topic_id: 1499 reply_id: 4247[/import]