Enter the following ActionScript in a frame on the Timeline:
var giants:Team = new Team("San Fran", "SFO");
trace(giants.name);
giants.name = "San Francisco";
trace(giants.name);
/* output:
San Fran
San Francisco
*/
When you trace giants.name, you use the get method to return the value of the property.
See also
Object.addProperty(),
316
Chapter 2: ActionScript Language Reference
set
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?