选取所有控件:
var instanceInfo:XML=describeType(this);//通过反射机制取出当前MXML中的信息
var properties:XMLList =instanceInfo..accessor.(@type=="mx.controls::Image");//找出所有的image控件
for each(var propertyInfo:XML in properties){
var propertyName:String =propertyInfo.@name;//此处取出的为control的id
if(propertyName!="adsl_test"){
(this[propertyName]).x=((this[propertyName]).x)*(neww/oldw);
(this[propertyName]).y=((this[propertyName]).y)*(newh/oldh);
}
}