Reputation: 2909
Following code is taken from above link. I have 2 questions.
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); //draw a red box aSp.source = aBox; aSp.setSize(150, 200); aSp.move(100, 100); addChild(aSp); function drawBox(box:MovieClip,color:uint):void { box.graphics.beginFill(color, 1); box.graphics.drawRect(0, 0, 150, 300); box.graphics.endFill(); }
Upvotes: 0
Views: 1996
Reputation: 16
You just have to drag the ScrollPane Component once on stage and then you can delete it from there. Then just add addChild for scrollpane in your above code and your scrollpane will be added.
Can you just elaborate on what kind of touch support you need for scrollpane?
Upvotes: 0
Reputation: 160
I use this class for simple touch scrolling in my apps https://github.com/freshplanet/Air-Mobile-ScrollController. IF you need a more complex UI you can also take a look at the Mad components library https://code.google.com/p/mad-components/ which has touch support and is design for mobile.
Upvotes: 1