Flash Vector例子

var s1:Student = new Student();

var s2:Student = new Student();

var s3:Student = new Student();

s1.name = "zhuhai1";

s2.name = "zhuhai2";

s3.name = "zhuhai3";

var sss:Vector.<Student> = Vector.<Student>([s1, s2, s3]);

trace(sss.length);

var i:uint = 0;

for (i = 0; i < 3; i++)

	sss[i].name = "xxx";



for (i = 0; i < 3; i++)

	trace(sss[i].name);

  

你可能感兴趣的:(vector)