Flash Script – Radio Button Component

Tweet

Flash’s radio button component makes creating radio buttons extremely easy.

1. To open the components panel, hit ctrl+f7.

2. Drag the RadioButton component onto the stage. Select the RadioButton component in Frame 1, and the component’s parameters will appear in the Property inspector.

3. Type "radio" into the Property inspector Instance Name text box.

4. The inital Value parameter specifies whether the initial state of the RadioButton component is selected (True) or unselected (False).

So, in the Initial Value parameter pop-up menu, select "false" so that the inital state of the radiobutton is unselected.

1185_1

5. Leave the Group Name and Data parameters as they are.

6. In the Label Placement parameter pop-up menu, leave the default value set to right alignment. This will ensure that the label will be displayed to the right of our radio button.

That’s all it takes. Test your movie!

Free JavaScript: Novice to Ninja Sample

Get a free 32-page chapter of JavaScript: Novice to Ninja and receive updates on exclusive offers from SitePoint.

No Reader comments