I'm sure this has a ridiculously easy answer that I just never learned
from my generally informal programming training, but I can;t figure out
what the problem is called, so I can't just google an answer. Here's
the (simplified) situation:
1. (Game::main()) we call Game::main(); no surprises here.
2. (_engine = new Engine()) Main sets up an 'engine' class and gets it
started up.
3. (_engine.getNextCommand()) Engine's job is basically to look at a
queue of Commands, ordered by the time they're supposed to execute, get
the next one, and execute it.
4. (_engine.onTurnComplete()) Engine waits until it gets notified that
the current turn is finished.
5. (engine.getNextCommand()) Engine looks for the next command....etc.
Now, the problem is that _engine.getNextCommand() never returns, so I
end up with a huge call stack with getNextCommand()s piled high, which
eventually makes Flash crap out. In the ancient version of this game,
the three basic stats were on different frames, so that the implied loop
here was broken up, and worked fine. My brain can't see that "right"
way to do this via main(), though. Any help, insight, or google search
terms?
-Mark Hawley
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders