1 Reply Latest reply on Dec 21, 2008 2:07 AM by Madhav Subedi

    Basic multi-screen structure in FLEX

      Hi everybody,
      first I should say that I am a newbe in terms of Flex. I really like the UI created by flex but I am probably too stuck with old HTML structure of a web. What I want to create: let’s say simple administration system (yes, I have read that Flex shouldn’t be used for this kind of application but I think it is possible). Ok, so I have a login screen [form], then list of articles [datagrid] and then editing screen [form]. I want the user to see one screen at a time.

      From this layout I am getting two questions: What should be the structure of the project in MXML and actionscript (packages, modules??) and What should I use to achieve the “html-like” structure, “from page to page”. Specifically I had a problem with updating the datagrid after I returned from editing, the same thing with the editing screen itself.

      I am assuming that I am probably going the wrong way, because what I had been doing so far was having a bunch of PHP files, producing XML files loaded into the Flex application (instead of simple presenting them in HTML). I would still like to know if it is possible to do this in FLEX and how. Without answering these questions I can’t even successfully begin.

      Thank you for your time and any advice, link to an article etc. It will be appreciated.
        • 1. Re: Basic multi-screen structure in FLEX
          Madhav Subedi Level 4
          flex builder generates separate html wrappers for each of mxml applications. so you could separate the login and backend modules if you can manage the session issues with php; otherwise you can manage it in same mxml file and display first the login screen in one mcomponent( or more simpler would be a state), and if login successful then show the edit/list modules or states.

          being specific to your question, if you design your code with multiple mxml (in turn html wrappers), navigating to other html(which means loading another mxml compiled swf) is done by following actionscript code:
          navigateToURL(new URLRequest("Target.html"),"_self");