开发者

How to open mxml file from other mxml file?

开发者 https://www.devze.com 2023-01-26 23:36 出处:网络
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.

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

精彩评论

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