openfl view example

This commit is contained in:
2013-10-11 15:57:55 +04:00
parent f57fabe75f
commit 99eba9fa50
2 changed files with 13 additions and 1 deletions

View File

@@ -17,7 +17,9 @@ class ViewExample implements ButtonViewListener {
}
public function new() {
var form:Dynamic = new Form().value;
//var form:Dynamic = new Form().value;
var bytes = openfl.Assets.getBytes("examples/form.json");
var form:Dynamic = haxe.Json.parse(bytes.readUTFBytes(bytes.bytesAvailable));
var v:IGroupView<Sprite> = GuiBuilder.build(form, {listener:this});
new Root(v);
var button3:ButtonView = v.findViewById("panel:button3");