The following example shows how you can create a horizontal or vertical Slider control in Flash using ActionScript 3.0 by setting the Slider control’s direction property to one of the static constants in the fl.controls.SliderDirection class (SliderDirection.HORIZONTAL or SliderDirection.VERTICAL).
Full code after the jump.
// ActionScript 3.0 import fl.controls.ComboBox; import fl.controls.Slider; import fl.controls.SliderDirection; import fl.data.DataProvider; var dp:DataProvider = new DataProvider(); dp.addItem({label:SliderDirection.HORIZONTAL}); dp.addItem({label:SliderDirection.VERTICAL}); var comboBox:ComboBox = new ComboBox(); comboBox.dataProvider = dp; comboBox.selectedIndex = 1; comboBox.move(20, 20); comboBox.addEventListener(Event.CHANGE, comboBox_change); addChild(comboBox); var slider:Slider = new Slider(); slider.direction = SliderDirection.VERTICAL; slider.move(20, 50); addChild(slider); function comboBox_change(evt:Event):void { slider.direction = comboBox.selectedItem.label; }
{ 4 comments… read them below or add one }
I tried it and it doesn’t work.
i want flash action script tutorials please provide me.
hi….. i am girish. please give me some of the action scripts which can be used for vertical or horizontal sliding of the images….
greetings… it is i, ahkmud amadeenagod, and i am requesting all of your actionscript files immediately to be sent here to me. you must send me everything you have so i can learn quickly. this is something you must do now because i command it. thank you many times in advance for your submission to my order…