public class LoaderInfoSample extends MovieClip
{
public function LoaderInfoSample(){
var key:String;
var value:String;
var text1:TextField = new TextField();
addChild(text1);
var param:Object = this.root.loaderInfo.parameters;
for (key in param) {
value = String(param[key]);
text1.appendText(key + “=” +value);
}
}
}
}
还有一点要注意的是,LoaderInfo属于As3的类,如果flash包含as1或者as2的代码,则它无法取出值,只能取出null