[Flashcoders] The Amazing infinite call stack, part 2

2005-12-13 Thread John Mark Hawley
A for loop wouldn't give we any way to pause for input, or to wait and let the UI animate to reflect the last command's doings, though. I need a way to avoid recursion, not use it. Ideally: 1. advance to next command. 2. execute command. 3. Wait for command to finish. 4. repeat 1-3 in some way

RE: [Flashcoders] The Amazing infinite call stack, part 2

2005-12-13 Thread Chris Wilson
] [mailto:[EMAIL PROTECTED] On Behalf Of John Mark Hawley Sent: Tuesday, December 13, 2005 1:54 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] The Amazing infinite call stack, part 2 A for loop wouldn't give we any way to pause for input, or to wait and let the UI animate to reflect

Re: [Flashcoders] The Amazing infinite call stack, part 2

2005-12-13 Thread JesterXL
@chattyfig.figleaf.com Sent: Tuesday, December 13, 2005 2:05 PM Subject: RE: [Flashcoders] The Amazing infinite call stack, part 2 Since Flash is event-driven, how about setting it up in such a way that whatever part of your script adds the command to the queue dispatches an event to a listener

Re: [Flashcoders] The Amazing infinite call stack, part 2

2005-12-13 Thread Andy Makely
You might look into using a Finite State Machine. They are a great way to do command sequencing, and are incredibly useful in game programming for lots of things, from updating the UI to building enemy AI behaviors. There's some good Flash-based FSM info at http://www.flashsim.com . -- andy