Created
September 27, 2012 19:45
-
-
Save kitschpatrol/3796055 to your computer and use it in GitHub Desktop.
Futi's BlockInertialScroll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create the scroll container | |
| var scrollTest:BlockInertialScroll = new BlockInertialScroll({ | |
| backgroundColor: Colors.GRAY, | |
| showBackground: true, | |
| width: 300, | |
| height: 500, | |
| maxSizeBehavior: BlockBase.MAX_SIZE_CLIPS_VIA_MASK, | |
| scrollAxis: BlockInertialScroll.SCROLL_Y, | |
| parent: this | |
| }); | |
| // Add stuff to it | |
| for (var i:int = 0; i < 50; i++) { | |
| var box:Shape = new Shape(); | |
| GraphicsUtil.fillRect(box.graphics, 260, 50, Math.random() * uint.MAX_VALUE); | |
| box.x = 20; | |
| box.y = i * 70; | |
| scrollTest.addChild(box); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment