import Login:
var gus:Login = new Login("Gus", "Smith");
trace(gus.username); // output: Gus
trace(gus.password); // output: undefined
trace(gus.loginPassword); // error
Because
is a private variable, you cannot access it from outside the Login.as class
loginPassword
file. Attempts to access the private variable generate an error message.
See also
public,
static
708
Chapter 2: ActionScript Language Reference
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?