Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mx.utils.Delegate;
- import com.control4.app_sdk_1_0.ui.UIText;
- import com.control4.app_sdk_1_0.ui.UITextStyle;
- import com.control4.app_sdk_1_0.ui.UIButton;
- import com.control4.app_sdk_1_0.ui.UIButtonStyle;
- import com.control4.app_sdk_1_0.ui.UIFrame;
- import com.control4.app_sdk_1_0.nav.UIView;
- import com.control4.app_sdk_1_0.nav.UINavigation;
- import com.control4.app_sdk_1_0.util.UILoader;
- class MyFirstPage extends UIView {
- private var button:UIButton;
- private var helloText:UIText;
- public function MyFirstPage()
- {
- this.onLoad = this.init;
- }
- public function init()
- {
- super.init("MyFirstPage", this);
- var queue:Array = new Array();
- var buttonFrame:UIFrame = new UIFrame(1,100,200,50);
- var textFrame:UIFrame = new UIFrame(1,200,200,50);
- queue.push({ target: this, component: "UIButton", instanceName:"button", frame: buttonFrame })
- queue.push({ target: this, component: "IOText", instanceName:"helloText", frame: textFrame })
- var loader:UILoader = new UILoader();
- loader.load(queue, Delegate.create(this, componentsBuilt));
- }
- public function componentsBuilt():Void {
- this._parent.nav.makeVisible();
- }
- }
Add Comment
Please, Sign In to add comment