This can be done fairly simply using an oop approach.

With out going into to much detail. You can create a single instance of a 
storage class that gets/sets the data that you are looking for.

Here is a really basic example:

package com.login{
        // do some imports
        
        public class myLogin{
                
                private var username:string = new String();
                private var email:string = new String();
                
                public function myLogin(){
                        // do some constructor stuff here
                }
                
                public function getUsername():String{
                        return username;
                }
                
                public function getEmail():String{
                        return email;
                }
                
                public function setUsername(username:string):void{
                        // set your username
                }
                
                public function setEmail(email:string):void{
                        // set your email
                }
        }
}

So when you first instantiate your class you set the username/email. Then all 
you will need to do is use getUsername/getEmail to retrieve the data that you 
are looking for.

One last point make sure you that only instantiate the myLogin class once.


Reply via email to