Join Login


Video Tutorials
Blog




Button Component


By: RiverCityGraphix      Views: 4721      Share: Bookmark and Share

In this tutorial, you will learn how to use the button component in Flash CS4.

The button component is a very nice and easy to use component. Just drag it onto the stage and it can act as any other button can in Flash. You can change the properties via Actionscript 3.0 or by going to the component inspector window. This button also has built in tgle capabilities as was demonstrated in the tutorial. This is a nice sleek button that can be used for mockups or for actual work.

Actionscript 3.0
mybutton.addEventListener(Event.CHANGE, changeit);

function changeit(event:Event):void{
	if (event.currentTarget.selected == true){
		green_light.visible = false;
		red_light.visible = true;
		mybutton.label = "Green Light";
	} else {
		green_light.visible = true;
		red_light.visible = false;
		mybutton.label = "Red Light";
	}
}




Free Source Files Zip

99Designs.com