A reader asked me a question based on my earlier post about how to maintain Login information in Flex and how to pass data along with Custom Events.
So, I decided to write up this post. I have written a simple example which does the following :-
1) Display a Login form with Username/Password fields.
2) Calls a AuthService for authentication on Click of the Login Button.
3) The AuthService fires a Custom Event if login successful and sends across the user details along.
4) The Main Page listens to the Event and sets the User details in a Static class for use anywhere in the Flex app.
5) The page changes its state when user is logged in.
The View Source is enabled on the example so feel free to look at or download the code. I hope this example helps answer the question here.
Pingback: 菲克斯咨询 » Blog Archive » 3月第一周精彩博客整理