标签:blog io ar sp for on div log cti
public static function removeAllChildren(container:DisplayObjectContainer):void{ try{ var child:DisplayObject; for (var i:Number = container.numChildren - 1; i >= 0; i--) { child = container.getChildAt(i); if (child is DisplayObjectContainer && !(child is Loader/*跨域引用图片时,子元素不允许访问,否则报沙箱安全移除*/)) { removeAllChildren(DisplayObjectContainer(child)); } container.removeChild(child); } }catch(e:Error){ Alert.show("Util.removeAllChildren异常:"+e); } }
标签:blog io ar sp for on div log cti
原文地址:http://www.cnblogs.com/regalys168/p/4158243.html