Index ButtonsFields Message Variables
Ask/Answer Colour Sound Menus QuickTime

Hiding and Showing Fields

Create a new stack as below and create 3 new fields in the background. Type names in each of the new fields.

Now do some scripting using theMessage Box (Command M shows and hide the Message Box).

Type hide background field 3 or hide fld 3 in the Message Box and press Return.

Try it again with hide fld 4 and hide fld 5

Now type show fld 4 and show fld 3

Each line you typed in the Message Box is a script. You could do a lot of scripting from the Message Box but you would have to retype the script each time you wanted to use

it, and you are limited to single line scripts.

Scripts can also be put into cards, stacks, backgrounds, fields and of course buttons. Make a button called show fld and use the option command keys while clicking on it to write a script.

Between the on mouseUp and end mouseUp type show fld 5.

Then press Enter and try out the new button

You can change the script in the button or make more buttons.

Using hide fld and show fld you can hide and show any number of fields.

If they are card fields you need to use hide card field... or show cd fld....

By using a list you can hide or show a number of fields with one button. Change the script of your button to read

A more efficient script would use a repeat loop to do the same task

Similarly you can write a script that shows many fields. Besides fields you can hide and show card and background pictures and card and background buttons.

By using a repeat loop like this you can change the number of fields without having to change the script

Return to top of page