ScrollPanel component as3




 

import fl.containers.ScrollPane;
import fl.controls.ScrollPolicy;
import fl.controls.DataGrid;
import fl.data.DataProvider;

var aSp:ScrollPane = new ScrollPane();
var aBox:MovieClip = new MovieClip();
drawBox(aBox, 0xFF0000);

aSp.source = google;
aSp.setSize(480, 480);
aSp.move(0, 0);

addChild(aSp);

function drawBox(box:MovieClip,color:uint):void {
box.graphics.beginFill(color, 1);
box.graphics.drawRect(0, 0, 480, 480);
box.graphics.endFill();
}

import fl.containers.ScrollPane;
function updateScroller() : void
{

sourcecontainer.source = google;
sourcecontainer.update();
sourcecontainer.verticalScrollPosition = sourcecontainer.maxVerticalScrollPosition;

}

updateScroller();