First, create a fresh project called
StageRight, switch to Design mode, delete the
width properties, and give the application a
BasicLayout. This demo uses a single
Button, so drag a
Button control into the application and drop it somewhere near the lower-left corner.
Now we’ll use the States pane to create a new state. If the States pane isn’t visible, you can show it by selecting Window→States. In the States pane, you should see
State1, the default state. All applications are considered to have at least one state, which is their default, or base state. You can create a new state based upon the base state by clicking the New State button in the States pane, as shown in Figure 13-3.
Figure 13-3. Creating a new state in the States pane
Clicking the New State button brings up a dialog box asking for information about the new state, as shown in Figure 13-4. You can give the state any name you want, but as always, it’s best to be descriptive. For this example, call the state
stageRight because all this state will do is move the
Button to the right.
Figure 13-4. The New State dialog box
To keep our code clean and readable, let’s edit the generically named
State1 so it’s in keeping with ...