import fl.controls.Slider;
import fl.events.SliderEvent;
import fl.controls.Label;
import fl.containers.UILoader;
//Mask
// AS3
var mc:MovieClip = new MovieClip();
mc.graphics.beginFill(0xFF0000);
mc.graphics.drawRect(120, 0, 200, 500);
mc.graphics.endFill();
mc.x = 0;
mc.y = 0;
addChild(mc);
mask = mc;
//scroller
var aSlider:Slider = new Slider();
aSlider.width = 200;
aSlider.snapInterval = 1;
aSlider.tickInterval = 10;
aSlider.maximum = 100;
aSlider.value = 1;
aSlider.move(120, 330);
var aLoader:UILoader = new UILoader();
var myImage:image = new image();
aLoader.addChild(myImage)
aLoader.scaleContent = false;
addChild(aLoader);
addChild(aSlider);
aSlider.addEventListener(SliderEvent.THUMB_DRAG, changeHandler);
function changeHandler(event:SliderEvent):void {
aLoader.x = event.value * 5;
}
|