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. = Vector.([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);

  

转载于:https://www.cnblogs.com/Robotke1/p/3309013.html

你可能感兴趣的:(Flash Vector例子)