forked from arpit/openpyro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestHDividedBox.as
More file actions
61 lines (47 loc) · 1.51 KB
/
TestHDividedBox.as
File metadata and controls
61 lines (47 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package
{
import flash.display.Sprite;
import flash.events.Event;
import org.openPyro.aurora.AuroraHDividedBoxSkin;
import org.openPyro.containers.HDividedBox;
import org.openPyro.controls.scrollBarClasses.ScrollPolicy;
import org.openPyro.core.UIControl;
import org.openPyro.examples.DimensionMarkerSkin;
public class TestHDividedBox extends Sprite
{
public function TestHDividedBox()
{
stage.scaleMode = "noScale"
stage.align = "TL";
stage.addEventListener(Event.ENTER_FRAME, initialize)
}
public function initialize(event:Event):void{
stage.removeEventListener(Event.ENTER_FRAME, initialize);
var hdbox:HDividedBox = new HDividedBox()
hdbox.skin = new AuroraHDividedBoxSkin();
hdbox.horizontalScrollPolicy = ScrollPolicy.OFF;
hdbox.width = 600
hdbox.height = 400
var redBox:UIControl = new UIControl();
redBox.name = "redBox"
redBox.skin = new DimensionMarkerSkin()
redBox.percentUnusedWidth = 50
redBox.percentUnusedHeight = 100
var greenBox:UIControl = new UIControl()
greenBox.name = "greenBox";
greenBox.skin = new DimensionMarkerSkin()
greenBox.width = 200
greenBox.percentUnusedHeight = 100
var blueBox:UIControl = new UIControl()
blueBox.name = "blueBox"
blueBox.skin = new DimensionMarkerSkin()
blueBox.percentUnusedWidth = 50
blueBox.percentUnusedHeight = 100
hdbox.addChild(redBox)
hdbox.addChild(greenBox)
hdbox.addChild(blueBox);
addChild(hdbox);
hdbox.x = hdbox.y = 20;
}
}
}