Flash CheckBox Component ActionScript 3 Tutorial
This Flash Component tutorial series show how to use some common components with ActionScript 3. If you did some programming before, you must be very familiar with the component control - Check Box, Radio Button, Combo Box, List Box and may be Progress Bar.
Flash Tutorial Content:
The Flash CheckBox component displays a small box that can contain a check mark. A CheckBox component can also display an optional text label that is positioned to the left, right, top, or bottom of the CheckBox.
The finished Flash Movie of this tutorial is shown as above. Click on the above Flash Movie and play around.
Flash ActionScript Codes:
//Uncomment the following line if you have to create runtime CheckBox
//import fl.controls.CheckBox;
// Declare variable
var checkboxStatus:Boolean;
// Add event listener to checkbox
myCheckBox.addEventListener(Event.CHANGE, checkboxChange);
function checkboxChange(evt:Event) {
// evt.target is [object CheckBox]
checkboxStatus = evt.target.selected ;
if (checkboxStatus == true) {
output_txt.text = "";
output_txt.text = "";
}
function checkStatus(evt:MouseEvent):void {
}
blueButton_btn.addEventListener(MouseEvent.CLICK, checkStatus);
Download Flash Source File:
Remarks:
This Flash ActionScript tutorial shows how to use Flash Checkbox component.