Creating a vertical Slider control in Flash using ActionScript 3.0

by Peter deHaan on December 23, 2008

in Uncategorized

The following example shows how you can create a vertical Flash ActionScript 3.0 Slider component by setting the direction property to one of the static constants in the SliderDirection class.

Full code after the jump.

// ActionScript 3.0
/* Requires:
 * - Slider control in Flash library
 */
import fl.controls.Slider;
import fl.controls.SliderDirection;
 
var slider:Slider = new Slider();
slider.direction = SliderDirection.VERTICAL;
slider.tickInterval = 1;
slider.move(20, 10);
addChild(slider);

{ 4 comments… read them below or add one }

1 priyanka 12.30.08 at 4:11 am

the is really nice n quite helpfull. it hepls in understanding the actionscript n provides us the code for most of the things that one wants to create in flash

2 DN 01.07.09 at 1:29 pm

Sorry, how to get the full code?

3 Peter deHaan 01.07.09 at 1:33 pm

DN,

That is the full code. Just drag a Slider component into your ActionScript 3.0 document’s Library panel and test movie.

Peter

4 senthilkumar 01.13.10 at 12:45 am

This code is totally wrong. it should be for button only. And we need focus on the same for movieclips and button. In order to proceed on this we need to do some changes on that. so that it make sense for movieclips.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: