Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Author Topic: StateMachine Sample Door  (Read 8402 times)
Helmut Granda
Full Member
Posts: 47

Flash Developer.

View Profile WWW Email
« on: June 22, 2009, 01:52:17 »

In the statemachine presentation in puremvc.org there is the mention of a door handle as an application to this concept. Is there source code for such application out there?
There reason why I am asking is because I don't know where to start in regards to the instatiation of the class. Granted the presentations go in great detail on where to place the XML and how to declare your states but the basics of where do you instatiate the class are left behind.
I apologize for those who seem this request rather absurd or noobish. There are some of use out there who would greatly benefit from this information. Just right now I am working on a project where I need to save the state of the application and I would like to use the StateMachine but I am not sure where to place it.
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: June 28, 2009, 09:00:06 »

There is no implementation of the Lockable Door described in the presentation, it was for illustrative purposes only. The overview presentations are necessarily abstract because the framework and the utilities exist in more than one language. Have a look at the StopWatch demo for an example of how and where to configure and inject your StateMachine. Note that it has not been updated to make use of entry and exit guards. It's just simple transitioning between states.

Stopwatch Demo:

A recent article on using the StateMachine from Joel Hooks:

You can also have a look at the original source code for the Sea of Arrows site here:

It's all been abstracted to a library and the visualization module refined so it's not exactly what's running now, but the StateMachine stuff is in the Shell package, and is just as described in the Getting in the Groove presentation on PureMVC TV.

Pages: [1]