tags:

views:

12

answers:

1

Hello everyone,

I come from ASP.NET and I am learning Flex now. I don't know if I can do what I want in flex, so imagine this in ASP: I have an aspx page that loads a Login.ascx control, the control checks if login is correct, and if so the aspx page loads the XXX.ascx control (so there is only one control visible).

I want to do more or less the same in Flex: I have the main application with the code that connects to the database, check the login, and if its correct it loads a new module. I have made everything until the module load, I mean, I have the main application (Login.mxml) associated to a Login.as, and a Module.mxml associated to a Module.as. When the user press the login button (in Login.mxml), a method is fired and checks the login. If it is correct, it shows the new module.

My problem is that it is shown in the same page that the login page, instead of "changing" the page. I have used two ways to do that: ModuleLoader and PopUpManager, and both load the new module in the same page.

QUESTION: How can I load, inside an application, a Flex module in a different page?

A: 

If you want to build Applications, I strongly suggest you get out of the page mindset. Excel doesn't have the concept of pages in it's UI as one example. You wouldn't have links tot he formula editor or whatnot.

But, that said you should probably investigate the BrowserManager and how to Deep Link into a flex Application. Then you can change the URL in the browser's address bar when your application view change.

If your adamant about applying the page paradigm to application building

You could also use the navigatetoURL to redirect to a different page which would load a new flex applications.

www.Flextras.com