2 Replies Latest reply on Dec 8, 2008 5:49 AM by Newsgroup_User

    Store Flex Variables

    drillnaut Level 1
      Hello Everyone,
      Here is my problem. I have a flex app that starts off with a login screen. If the login is successful , the app transistions away from the login box and goes to the main app. However I need to be able to store the username entered for later use.

      For example, I tried making a variable s Bindable, then doing
      <mx:TextInput x="10" y="36" id="username" text="{s}"/>
      for the login screen.

      after transitioning to the main app I have a Button whose label is supposed to be "s",
      <mx:Button x="30" y="50" label="{s}" />
      however, the button is blank.

      Any suggestions ?

        • 1. Re: Store Flex Variables
          amol bhandwale Level 1
          solution:
          <mx:TextInput x="10" y="36" id="username" text="{s}" change="{s=username.text}"/>
          store the change value in s on change of login id,so tht it will save in variable s so u can access it later.






          • 2. Re: Store Flex Variables
            Level 7

            "drillnaut" <webforumsuser@macromedia.com> wrote in message
            news:ghhq10$141$1@forums.macromedia.com...
            > Hello Everyone,
            > Here is my problem. I have a flex app that starts off with a login
            > screen.
            > If the login is successful , the app transistions away from the login box
            > and
            > goes to the main app. However I need to be able to store the username
            > entered
            > for later use.
            >
            > For example, I tried making a variable s Bindable, then doing
            > <mx:TextInput x="10" y="36" id="username" text="{s}"/>
            > for the login screen.
            >
            > after transitioning to the main app I have a Button whose label is
            > supposed to
            > be "s",
            > <mx:Button x="30" y="50" label="{s}" />
            > however, the button is blank.

            try

            <mx:Button x="30" y="50" label="{username.text}" />

            HTH;

            Amy