This ActionScript tutorial, and many like it can be found on my site Say Web Tutorial

All SWF files are CLIENT applications. This means unlike PHP it runs on the locally on  the site visitors computer. This involves several security concerns since we never know who wrote the SWF, making any internet client language very hard to create. Currently Flash and ActionScript are by far the most popular and powerful client and internet language. To leverage this power lets take a look at the SLIDER component.

Components Menu Panel. To find the SLIDER component, the procedure is similar to most components. Ask for Windows-> Components. Once you drag and drop sliders into stage make sure to give unique INSTANCE NAMES to each one of them. Instance names is the way we refer to stage items in ActionScript.




Component Property Inspector. The SLIDER like any other component has a set of properties. To access these properties, againg Windows -> Component Inspector



Now we want 2 sliders reflect the X (Horizontal) coordinate and the Y (Vertical) Coordinate so, therefore their MAXIMUM value should be correspondent or proportional to the Width (Horizontal) and Height (Vertical) of the give stage sizer. To find these values, click on the stage and check the properties Window. It is possible to use the FREE TRANSFORM tool to the slider, so if you want to rotate, stretch or squeeze, go ahead!



Note that the REGISTRATION point of any symbol is located at upper left hand corner that this will define the center. So unless the registration point is centered there will be situations where the symbol will be completely outside of the stage.




Now we are set to go.

HERE IS THE SOURCE CODE!

//The ActionScript 3.0 The Slider Component
// Avraham Saltoun
 // solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
import fl.controls.Slider;
import fl.events.SliderEvent;
 // This will import slider
 // properties, methods and events


xSlider.value = ball.x;
ySlider.value = ball.y;
 //This will adjust the sliders
// to hold the value of the
// coordinates of present location


xSlider.addEventListener (SliderEvent.CHANGE, sliderChange);
ySlider.addEventListener (SliderEvent.CHANGE, sliderChange);
//Both Sliders will go to the same function

 function sliderChange (event:SliderEvent){
switch (event.target.name){

case 'ySlider':
ball.y = event.target.value;
break;

case 'xSlider':
ball.x = event.target.value;
 break;}
 x_txt.text = String(ball.x);
 y_txt.text = String(ball.y); }
 

This should be a final result: