Note: This is a tutorial for CommandSim Instructor Edition, not the multiplayer (Department) Edition.
For an example of what is described in this tutorial (and provided in the attached files), click here
For those of you familiar with the simulations we made for FireEngineering.com, you will notice the way we made our navigation -- using a consistent, simple dial with arrows that light up in the directions one can move. When the user clicks on an arrow, Flash loads the next visual but doesn't show it until the visual has loaded completely, ensuring a seamless transition. That is nice. If you use the Navigation Arrow component, however, it simply loads the next file, which may take some time during which a white screen appears--not so nice.
This article tells you how you can use the navigation dial in your simulations. The attached files give you a simple, basic example with four sides of a building (A, B, C, D), except there are no pictures for the buildings. You build up your locations as you'd like.
We have provided in the attachment two key files:
- SimContainer.fla: This contains the basic code to make the Responding Screen. It also contains the graphics and code for the navigation dial. You only need to modify one part of this to use it for your simulation, and then you will start your simulation by running SimContainer.swf (or whatever you name it).
- NavigationControl.as: This is code you need to have in the same folder as each of your location FLA's.
The basic idea is for you to create your simulation views/locations, and add a special script that tells Flash where to move on different arrows (up, down, left, right, forward, back, and then in-between locations as well, such as backward-left, etc.). We'll look at that in a moment.
Modifying SimContainer.fla
The SimContainer file gives you a Responding screen (which you can modify) as well as loading the dial navigation. In this file, you need to specify the location file to load when the user 'arrives on scene', for example, at Side A (in this example), or Staging, or wherever.
To specify the location file to load, open SimContainer.fla and go to the initial location layer, click on the second keyframe, and open the Actions panel (Windows > Actions), as seen here:

You can see on Line 2 in the Actions panel (right) that the example loads location "A" first. If your first location is not called A, change this line in the file to the name of your file (without the SWF extension), then click on the menu Control > Test Movie to create the SWF file.
If you are using states for your simulation, or you are using variables in your simulation, for example, for victims or sounds, etc., you will want to set the initial state and initialize those variable in the initGlobals() function, which is on the initGlobals layer:
If you are using states, make sure to add the appropriate number of state managers to the SimContainer.fla file. For an example of this, please visit the Instructor Edition Scenario Sharing site (for customers only, registration required, contact us if you do not have a registration id).
That's all you need to do in SimContainer.fla. Let's move on to the individual location files.
Setting the Movement Directions in a Location File
In the attached example file, open A.fla, B.fla, C.fla, or D.fla -- it doesn't matter. They are very basic, just enough to illustrate the point. They key thing you must do is to set which directional arrow goes where. You do this by selecting the bottommost layer (nav), then opening the Actions Panel (Windows > Actions). You will see something like the following:

Each direction consists of three items you should edit (in this example, for the down arrow):
- x.down: Change this to true if you want to allow movement in that direction
- x.downFile: Set the filename (without the SWF) of the target for moving in that direction
- x.downLabel: Set the text string you want Flash to show when a user hovers over that direction.
Once you complete these changes for acceptable direction movements, the code takes care of the rest. Test your movie (SimContainer), and then when a location loads, the appropriate arrows will light up and take your user to your chosen target location.