This new actionscript below made my scrollpane work. However I have a new problem now. My Flash file has 9 scenes. Once I go to the scene where the scrollpane is and then go to another scene it shows up in every scene. How do I change this?
import fl.containers.ScrollPane;
import fl.controls.ScrollPolicy;
import fl.controls.DataGrid;
import fl.data.DataProvider;
var aSp:ScrollPane = new ScrollPane();
var vendor_scroll:cat = new cat();
addChild(vendor_scroll);
aSp.source = vendor_scroll;
aSp.setSize(245, 458);
aSp.move(332, 120);
aSp.horizontalScrollPolicy = "off";
addChild(aSp);
aSp.addEventListener(Event.ENTER_FRAME, aSp_ENTERFRAME);
function aSp_ENTERFRAME(e:Event):void
{
trace("horizontalScPosition: " + aSp.horizontalScrollPosition +
", verticalScrollPosition = " + aSp.verticalScrollPosition);
}
|