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

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい