Checkbox in flash

Adobe Flash has an inbuilt function that allows you to insert a checkbox in flash easily and quickly.
From the main menu options select window>components. A window will appear with a few different catergories to choose from, you will need the user interface catergory, from the user interface catergories double click on checkbox. This will insert an instance of a checkbox on the stage.
Select the checkbox and open up it's properties panel, there are three tabs, properties, filters and parameters, select the parameters tab. A table will now appear in the parameters panel, locate label, in empty box next to label, insert the text yes, also check that the text on the table that reads selected, is set to false. There should now be a checkbox on the stage with the word yes on the right hand side of it. Select the yes checkbox, just above the properties tab, there is an actions tab, click it and insert the following actionscript:

onClipEvent (enterFrame) {
if (this.selected) {
_root.gotoAndStop(2);
}
}

This tells flash that when it enters the frame, it needs to wait until the checkbox is selected, before going to frame 2.

Checkboxes are really useful for things like collecting date and reviews, quizes, serveys, web forms etc.

No comments: