forked from arpit/openpyro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestVDividedBox.as
More file actions
72 lines (55 loc) · 1.77 KB
/
TestVDividedBox.as
File metadata and controls
72 lines (55 loc) · 1.77 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
62
63
64
65
66
67
68
69
70
71
72
package
{
import flash.display.Sprite;
import flash.events.Event;
import org.openPyro.containers.VDividedBox;
import org.openPyro.core.UIContainer;
import org.openPyro.core.UIControl;
import org.openPyro.examples.DimensionMarkerSkin;
import org.openPyro.layout.HLayout;
import org.openPyro.painters.FillPainter;
public class TestVDividedBox extends Sprite
{
public function TestVDividedBox()
{
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 vdbox:VDividedBox = new VDividedBox()
//hdbox.skin = new AuroraHDividedBoxSkin();
//vdbox.horizontalScrollPolicy = false;
vdbox.width = 400
vdbox.height = 600
vdbox.x = vdbox.y = 20;
var greenBox:UIControl = new UIControl()
greenBox.name = "greenBox";
greenBox.skin = new DimensionMarkerSkin()
greenBox.percentUnusedWidth = 100
greenBox.height = 40
var redBox:UIControl = new UIControl();
redBox.name = "redBox"
redBox.skin = new DimensionMarkerSkin()
redBox.percentUnusedWidth = 100
redBox.percentUnusedHeight = 50
var blueBox:UIControl = new UIControl()
blueBox.name = "blueBox"
blueBox.skin = new DimensionMarkerSkin()
blueBox.percentUnusedWidth = 100
blueBox.percentUnusedHeight = 50
vdbox.addChild(greenBox)
vdbox.addChild(redBox)
vdbox.addChild(blueBox);
var main:UIContainer = new UIContainer();
main.size(500,600);
main.backgroundPainter = new FillPainter(0xdfdfdf);
main.layout = new HLayout();
main.addChild(new UIControl().size(100,"100%"));
main.addChild(vdbox);
addChild(main);
main.x = main.y = 10;
}
}
}