开发者

How to open mxml file from other mxml file?

In my flex 3 application, i am maintaining two mxml files say one.mxml and two.mxml. How can i call two.mxml from one.mxml. I don't want to use any variables from differe开发者_开发技巧nt mxml files. I want to redirect it. How it can be? Thanks in advance


Try this

var pop:mxmlFileName= mxmlFileName(PopUpManager.createPopUp(Sprite(Application.application),mxmlFileName,true));
PopUpManager.centerPopUp(pop);

I stumbled upon this while debugging a project I am working on. Not sure if it is optimised anyway but it should work.


you can simply create an instance, then add it to stage: var one:One=new One(); addElement(one); but don't forget, one.mxml must not be an application, only a component. if it is so, you have to reedit the main node of the mxml.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜