Join Login


Video Tutorials
Blog



Royalty Free Images

Slider Component


By: RiverCityGraphix      Views: 4401      Share: Bookmark and Share

In this tutorial, you will learn how to use the Slider Component in Flash CS4.

The Slider Component in Flash is great for adding user interactivity. You can allow users to change the color or size of an object. The slider gives a range of values that can be assigned to almost any task making this component very versatile. In the video I mentioned that the slider could even be used for video. Flash has a built in video scrubber component, but the slider should work as well. Good luck and have fun using the slider component in Flash.

ActionScript 3.0
import fl.events.SliderEvent;

sizetxt.text = "Current Size: 10";
slider.value = 10;
slider.maximum = 20;

slider.addEventListener(SliderEvent.CHANGE, resizecircle);

function resizecircle (event:SliderEvent):void{
sizetxt.text = "Current Size: " + event.target.value;
circle.scaleX = event.target.value /10;
circle.scaleY = event.target.value /10;
}




Free Source Files Zip

Create a Social Network!