Tutorial 4

The media object. Displaying and removing images.

Instructions
Drag and arrange states onto the canvas so that you have the following setup:


Make sure that repair mode is turned off in the preferences dialogue (see Tutorial 3 for details on how to do this).



In "question", enter the prompt: "Tell me something about this president." To the left output port, add the following vocabulary:

first president
mount vernon
cherry tree
dollar bill
father of his country

The vocabulary for the right port is *any. In the state "great", add a prompt that says "Great job!".
Now it is time to configure the media objects so that they display and remove a picture of George Washington.

Right click on the "show_george" state, and select "Present Media" from the context window. This will open the present media dialogue, where you will configure the media which you wish to present.



In the Text area of the dialogue, enter "George Washington". This text will serve as a caption for the image which will be displayed.

Next, in the Image area, select "Browse...", and find the image of George Washington which is provided with this tutorial. It is a file called "washington.gif" which can be found in the same directory as the tutorial application for this tutorial.

Finally, in the Window Placement area of the dialogue, select "Modify". This will raise the image placement dialogue. Select "Center", and then select "Ok" to return to the present media dialogue. By doing this, you've configured the "show_george" state to place the image and text in the center of the screen.


This state is now configured to display the image of George Washington. The image will not be removed from the screen until it is explicitly removed by another media object.

To remove the image, select "Remove Media" from the context menu of the "remove_george" state. This will raise the remove media dialogue, which contains a list of media states in the application. By selecting a state in this dialogue, you'll remove any images and text that were displayed in the selected state.

Once you've configured this state to remove the image of George, build and run your application to see the media object in operation.