Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a:A = new A();
- a.b = "woopy"; //Sets the Label (declared in mxml) withn A to "woopy"
- this.addChild(a);
- <customNamespace:A b="woopy"/>
- var a:A = new A();
- this.addChild(a);
- a.b = "woopy"; //Sets the Label (declared in mxml) withn A to "woopy"
- var a:A = new A();
- a.initialize();
- a.b = "woopy";
- this.addChild(a);
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
- <mx:Script>
- <![CDATA[
- [Bindable]
- public var labelText:String = "[Default]";
- ]]>
- </mx:Script>
- <mx:Label text="{labelText}"/>
- </mx:Canvas>
- var a:A = new A();
- a.addEventListener(FlexEvent.INITIALIZE, a_initialize);
- addChild(a);
- private function a_initialize(event:FlexEvent):void
- {
- a.b = "woopy";
- // ... and so on
- }
- private var label:Label;
- public function get b():String
- {
- return this.label.text;
- }
- public function set b(value:String):void
- {
- this.label.text = value;
- }
- private var label:Label;
- private var _b:String;
- public function get b():String
- {
- return this._b;
- }
- public function set b(value:String):void
- {
- this._b = value;
- this.invalidateProperties();
- }
- override protected function commitProperties():void
- {
- super.commitProperties();
- this.label.text = this._b;
- }
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
- <mx:Label text="{this.b}"/>
- <mx:Script><![CDATA[
- private var _b:String;
- [Bindable]
- public function get b():String
- {
- return this._b;
- }
- public function set b(value:String):void
- {
- this._b = value;
- }
- ]]></mx:Script>
- </mx:Application>
Add Comment
Please, Sign In to add comment