-
Data binding in pure AS3
In MXML Flex, you can use {} to bind data. In AS3, how do you bind data?
For example, I have a text input box and when I click the Submit button, it writes the text of the the input box into a child node in an XML file.
-
So, no one knows this stuff?
-
I believe binding like that is a flex feature, not an AS3 feature. It generates AS3 code in the background. The AS3 would look something like this:
Code:
submitButton.addEventListener(MouseEvent.CLICK, doSubmit);
private function doSubmit(e:MouseEvent):void{
var text:String = textbox.text;
someXML += XML("<someNode>"+text+"</someNode>");
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|