Hi Chris,

I'm paraphrasing, but you probably want something along these lines:

In the view:

<mx:Button label="Toggle States" click="toggleStates()" enabled="{model.isAuthenticated}"/>
<mx:Button label="Login" click="dispatchEvent(new LoginEvent (password.text))"/>

In the controller

public function onLoginAttempt (e:LoginEvent)
{
        if (passwordIsValid(e.pasword))
        {
                model.isAuthenticated = true;
        }
}

Cheers,
Lach

On 08/12/2006, at 1:09 AM, qnotemedia wrote:

I have an application that has two states (View and Edit), and one
button toggles between the two states. There are a few components, but
none of them are required for the non-logged-in state.

Can someone recommend a methodology for implementing some very simple
security in he main app? i.e. typing in a username/password (or maybe
just a password only), and on success, enabling the button that toggles
the states.

It seems that most articles I've read on the topic are at a much higher
level, but not all of us are building enterprise level Flex apps. I
don't have FDS, I can't use RemoteObject on my server (HostMySite), and
I'm using ColdFusion 7.01 on the backend.

Thanks - Chris

Reply via email to