PDA

View Full Version : State of Check Box Button



wudtwu
05-12-2002, 01:16 PM
I am thinking of using Button of the Check Box type to create the option of skipping of the Intro page or not. I am doing it as follows:
1. I have an Event Object checking for 1 global variable on the Intro Page. If Zero, show the Intro. If One, skip the Intro page.
2. On the Intro page, I have a Check Box Button. If checked, global variable is set to One.
3. On the Help page, I have a Check Box button. If checked, global variable is set to zero, and the Intro will be shown when the demo is launched the next time.
4. I want to show the Check Box button "With a Check Mark", or "Without a Check Mark" on the Help Page or the Intro page, depending on the Global Variable. If Zero, Without a Check Mark. If One, With a Check Mark. So, that these buttons can be used again and again for controlling the skipping or not skipping of the Intro Page.
Is this possible? The real question is can you set the state of the Check Box Button (Checked or not Checked) depending on a Global Variable.

Thanks.

D.T.Wu

KimberlyH
05-13-2002, 11:10 AM
I was able to use a checkbox in the intro scene of a demo and the help scene to allow the user to skip the intro and then reset the intro by doing the following:

When the user selects the checkbox to skip the intro, two actions are performed:

1. Go To Next Scene
2. Perform Calculation to set a Global Variable to a value of 1

Then, in the Help scene when the user selects to reset the intro checkbox, instead of assigning the actions to the checkbox, I use an Event Object ouside of scene time to check the pressed property of the checkbox when the user clicks on another button to take them to a different scene. If the checkbox is pressed, the Global Variable will be reset to 0. If the checkbox is left unpressed, nothing will happen.

Then, I created a blank scene at the very beginning of the demo to check the value of the Global Variable. If the value is equal to 1, then the event will take the user to the scene after the intro and set the checkbox in the Help scene to a pressed property of 0 (unpressed). If the value does not equal 1, then the event will to to the Intro scene and set the pressed property of the skip intro checkbox to a value of 0 (unpressed)

I have created a sample demo for you to view. Please take a look and let me know if you have any questions.

All the best,