Hi,

I am trying to utilize states to ultimately have a login page when my 
app loads, upon successful login, I want my main.mxml file to load 
which is basically the "home page" of my application.

As of now in the "states" panel, I have a base state, but my base 
state is my home page and I do not want this.  I want my login page 
to be the base state.


In the states panel, I tried adding a state called home, but I think 
everything is on the same state, meaning my login is not the base and 
my home page is not on the home state.  If I click the base state, 
should I only see whats on that state?  Are states like "layers" in a 
sense, layers in terms of Photoshop or Fireworks?

In "design view" I can switch between states, but nothing really 
happens.

Any help appreciated.  As of now I just have two files.  1 main mxml 
file and 1 custom component.

This is my login.mxml page, which I wanted to be a custom component 
(code borrowed from a tutorial):

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"; xmlns="*" 
layout="absolute" title="Member Login" width="275" height="150">
<mx:Script>
    <![CDATA[
    private function handleLoginEvent():void {
        lblTest.text = "logging in...";
        //login logic
    }
    ]]>
</mx:Script>
    <mx:Label x="8" y="20" text="Username"/>
    <mx:Label x="14" y="50" text="Password"/>
    <mx:TextInput x="78" y="18" id="txtUID"/>
    <mx:TextInput x="78" y="48" id="txtPwd" displayAsPassword="true"/>
    <mx:Button x="188" y="78" label="Login" click="handleLoginEvent
()"/>
    <mx:Label x="78" y="78" id="lblTest"/>
</mx:Panel>

thx

-Malik







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to