开发者

How do i call a mxml file in a pop up window

Sorry i am new with flex , i need some help.

I have created a mxml file , and i would like to display it in a pop up window. i have alrdy done the pop up window, but i couldn't display the mxml file i have done . I am not trying to call the pop up window in the mxml page.

this is my popup window i have done:

&l开发者_JAVA百科t;mx:Script>
    <![CDATA[       
        import mx.managers.PopUpManager;
        import mx.controls.Text;
    ]]>
</mx:Script>

<mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/>

Thanks


Right before your <mx:Button> open a new tag ('<') and start typing the file name of your MXML file. Flash builder should auto complete it for you. It should look something like this:

<mx:Script>
    <![CDATA[       
        import mx.managers.PopUpManager;
        import mx.controls.Text;
    ]]>
</mx:Script>
<yourComponentNamespace:YourCustomComponent />
<mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/>

That's it. You can now set properties just like you would normally on all other components.

P.S. If you're new to Flex and are just starting, why are you using Flex 3 instead of the newer Flex 4 components? (mx = Flex 3, s = Flex 4).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜