accessing elements of mxml in actionscript
how access mxml elements actionscript?
hi,
just add , id mxml component , use name in actionscript like:
<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minwidth="955" minheight="600" creationcomplete="init()">
<mx:script>
<![cdata[
import mx.controls.alert;
private function init():void{
alert.show(test.text);
}
]]>
</mx:script>
<mx:label id="test" text="my test" />
</mx:application>
i hope help.
johnny
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment