I'm not sure why this is not working but I can't seem to get it to work
correctly...

 

I've got the following code:

 

            <mx:State name="Startup">

                  <mx:AddChild position="lastChild">

                        <mx:Image x="31" y="30" source="images/FT.gif"/>
(this one displays the logo correctly)

                  </mx:AddChild>

                  <mx:AddChild position="lastChild">

                        <controllers:windowedApplication top="0"
left="0" right="0" bottom="0" borderColor="#E9321A"
backgroundColor="#FBF5F5"/>

                  </mx:AddChild>

                  <mx:AddChild position="lastChild">

                        <mx:VBox width="100%" height="100%"
horizontalAlign="center" verticalAlign="middle" >

                              <controllers:Login

                                          id="loginController"

                                          width="500" height="400"

 
loginSuccessful="this.currentState='LoggedIn';"  currentState="login"
horizontalAlign="center"/>

                        </mx:VBox>

 

                              

                  </mx:AddChild>    

            </mx:State>

 

I changed the login class so that it will work in all states.  So in
other words, I want to move the login controller outside of the main
state handling and always displayed.  It will show a button to log in, a
login screen, and a welcome with a logout button depending on the state
within the login controller.

 

Anyway, if I move the:

 

      <controllers:Login

                  id="loginController"

                  width="500" height="400"

                  loginSuccessful="this.currentState='LoggedIn';"
currentState="login" horizontalAlign="center"/>

 

 

outside of the state then it will not display.  I also tried to create a
vbox/hbox like this:

            <mx:Script>

(singleton class)

...         

...

            </mx:Script>

      <mx:HBox x="10"   y="30">

            <mx:Image source="images/FT.gif"/>  

      </mx:HBox>

      <mx:VBox x="100" y="100"> (tried with/without location x/y)

            <controllers:Login

                        id="loginController"

                        width="100%" height="100%"

 
loginSuccessful="this.currentState='mainApplication';"
currentState="login" horizontalAlign="center"/>

                  

</mx:VBox>

<mx:States>

      <mx:Name="login">

Etc.....

 

Also, the FT.gif does not display when it's outside the mx:States area.


 

Any ideas on why this is happening?

 

Thanks!

Reply via email to