On 2/20/2014 6:20 PM, Alex Harui wrote:
IMO, I've seen all of these questions asked before, but I don't know if it
would be "frequently".  For #1, #2 and #3, most folks use an IDE which
tends to prevent getting caught like this.  IIRC, you were trying to not
use an IDE?

Right. I'm using a text editor and the command line. Maybe I should use Eclipse if there's a free plug-in for AS3.

For #4, there are a variety of application patterns like MVC that help you
share things.  Folks use Singletons, or Locators, or just global
variables.  Each has their advantages and disadvantages.

I think I was already drifting toward MVC in my design. The MOdel is class Game and its subcomponents: Room, Character, Thing (treasures and other movable objects). Game holds the state, and also knows how to serialize itself to external storage (so the game can be saved).

The View is the top-level MXML file and the Objects that display in it -- buttons, the map, etc.

And the Controller is the GameSequence object, which decides which part of the view should show next, and tells it which buttons and icons to show.

Now, to review MVC and look over a typical old MFC application to see how the pieces communicate nicely...

Reply via email to