You are on page 1of 7

w w w . i n d i g o r o s e .

c o m

TUTORIAL: Showing and Hiding Objects

Article ID: IRKB-AM3-000002

The information in this article applies to:


AutoPlay Menu Studio 3.0

Summary
This article is an intermediate level, step-by-step tutorial about using AutoPlay Menu Studio
3.0 to show and hide objects.

Tutorial
Welcome to the Showing and Hiding Objects tutorial. This tutorial shows you, step-by-
step, how to show and hide objects in your AutoPlay Menu Studio 3.0 menu.

Step 1 Displaying a Variable


The key to showing and hiding objects on the screen in an easy manner is using a variable.
This step shows you how easy it is to create a variable and display it.

1. Start a new project


2. Create a Text object, setting the Message to %InfoVar%. %InfoVar% is a
variable that will store your information.

3. Select the Attributes tab and change the Name of your Text object from
TextObject1 to InfoTXT.
4. Change the Cursor from Hand to Arrow.
5. Click OK to create the object.
6. Drag the object to the right side of the screen and resize it so that it takes up about
half of the screen.
7. Select Page | Properties and select the Action tab.
8. Make sure the Open tab is selected in the Events section and create a new action:
Pages | Hide Object

IRKB-AM3-000002 - Page 1 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
9. Click on the Object Name field, this will drop down a menu with InfoTXT in it,
select InfoTXT and click OK.
10.Preview the menu by either by selecting Project | Preview or by pressing F5.

You will notice that although the Text object InfoTXT was visible in the design time
environment, it is invisible when the menu is built and run. This is because in Steps 4 and 5
we tell AutoPlay Menu Studio to hide the object InfoTXT on pages Open event.

NOTE: During the preview of a menu you can always exit by Right-Clicking and selecting
Exit Menu.

Step 2 Showing the Object on a Mouse Over


Next, we are going to set our menu up so that our object is displayed when the cursor is
moved over another object.

1. Create an Image object by selecting Object | Image, or by pressing Ctrl+2.


2. For the Normal Image select Media Library\Buttons\Balls\GreenBall.png from the
AutoPlay Menu Studio 3.0 folder.
3. Check the Transparent background checkbox; notice that since the background of
the image is black, nothing has happened.
4. In order to make the background transparent you will have to press the
Transparent Color button. Once you have done this you should see the cursor
change from an Arrow to Crosshairs. Simply move the crosshairs onto the image so

IRKB-AM3-000002 - Page 2 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
that the center of the crosshairs in on black, and click. Now all you should see is the
green ball.

5. Repeat this process for the Highlight Image, except this time use the file, Media
Library\Buttons\Balls\GreenBall2.png.
6. Go to the Actions tab of the object and select the Mouse Over tab in the Events
section.
7. Create a new Action: Pages | Show Object.
8. Click in the Object Name field and select InfoTXT.

IRKB-AM3-000002 - Page 3 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
9. Select the Mouse Leave tab in the Events section.
10.Create a new Action: Pages | Hide Object, and select InfoTXT in the Object
Name field.

Now lets preview our menu and see what happens. If we move the mouse cursor over the
green ball we see two things happen:

The Image Object, switched from its Normal image to its Highlight Image
The text %InfoVar% is displayed on the right side of the screen as long as the cursor
stays over the ball.

IRKB-AM3-000002 - Page 4 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
Step 3 Changing the Displayed Text
Simply displaying %InfoVar% on screen may look neat, but it is not useful at all. This step
will show you how to display some useful text, rather then the variables name.

1. Double click on ImageObject1, in order to bring up the Image Object Properties


screen, and select the Actions tab.
2. Select the Mouse Over event, and create a new Action: Variables | Assign Value.
3. In the Name field, delete %MyVar% and replace it with %InfoVar%.
4. Click on the Value field and type: This is my AutoPlay menu, usually some relevant
text would appear here, but not right now.
5. Click on the Blue up arrow in order to move the Assign Value action in front of
(above) the Show Object action.
6. Click OK.

IRKB-AM3-000002 - Page 5 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
Lets preview our menu now and see what we have created. Notice that the text gets
wrapped nicely in our runtime menu. Most menus that you are going to create will have
more then one button, so it is likely that you are going to want to have more then one
message displayed.

Step 4 Changing the Text of an Object Dynamically


This step will show you a quick and easy way to display different information on screen for
different objects.

1. Click on ImageObject1 and then select: Edit | Copy to copy the Image object.
2. Select Edit | Paste to past the Image object. Now you have just copied and pasted
the Image object but it appears as though nothing has happened. This is because in
AutoPlay Menu Studio 3.0, when you Copy and Paste an object, the copy gets
pasted in the exact same location as the original. When you select the green ball
and drag it downwards you will notice that there are, in fact, two copies of
ImageObject1.

IRKB-AM3-000002 - Page 6 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.
3. Double Click on the second Image object and go to the Attributes tab, notice that
the Object Name is ImageObject2. Now go to the Actions tab, select the Mouse
Over event, and click on the Assign Value action. Delete the text in the Value
field, and type this in: The information in my variable is changing.
4. Click OK to accept the changes.

Preview the menu and move the mouse over both ImageObject1 and ImageObject2 in
order to see how our menu is functioning. Notice what happens when you move the cursor
over ImageObject2. The text that gets displayed is: The information in my variable is
changing. When the cursor is over ImageObject1 the text displayed is: This is my
AutoPlay menu, usually some relevant text would appear here, but not right now.

Basically, what is happening in our menu is we are showing and hiding the Text object
InfoTXT on Mouse Over and Mouse Leave events. The Message text of InfoTXT is
%InfoVar%, and since we treat %InfoVar% as a variable by assigning values to it, AutoPlay
3.0 treats it as a variable and displays its value during runtime. In a nutshell, we are
hiding, showing, and assigning values to a variable called %InfoVar%.

More Information
The best place to go for more help about AutoPlay Menu Studio is the online help file that
ships with the product. All of the products features are covered in much more detail there.
If you have any questions, please contact: support@indigorose.com.

IRKB-AM3-000002 - Page 7 of 7
Last Reviewed: September 13, 2000
2000 Indigo Rose Corporation. All Rights Reserved.

You might also like