2 Replies Latest reply on May 8, 2008 11:26 PM by slaingod

    passsing variables between mxml files

      How can we pass variables from 1 mxml file to another mxml file?If it's possible how we do and if it's not the solution how to pass variables(and corresponding values)?
      In my case for example: from login.mxml page ,after logged in successfully i want to move to menu.mxml page with information of logged in user.
      Give me some ideas thanks
        • 1. Re: passsing variables between mxml files
          atta707 Level 2
          dispatching event would be a good start.

          alternatively you can create second MXML as a Module and use Interfaces and/or events to pass info.
          • 2. Re: passsing variables between mxml files
            slaingod Level 1
            Generally, you would use either a custom event to pass some data in reaction to a user event, or you would use a separate model to store shared data. You could also create an interface with 'implements' to allow access to some components data, but with a sense of abstraction preserved.

            That said, quick and dirty is to use this.parentApplication.<some_shared_variable>, or this.parentApplication.<some_component>.<the_public_variable>
            or if the component was a child of the other you could use this.parent....