深入理解Flash的沙箱 – Security Domains_下
需要跨域策略文件把跨域的SWF加载到相同的安全域
要加载某个SWF到自己的安全域内,需要给Loader.load方法指定一个LoaderContext对象。LoaderContext对象的securityDomain属性设置为当前的安全域(SecurityDomain.currentDomain)。通过这样的加载方式,父SWF授信给子SWF,而子SWF的授信则需要通过跨域策略文件。
http://host.example.com/parent.swf:
addChildaddChildAtremoveChildremoveChildAtgetChildIndexsetChildIndexgetChildAtgetObjectsUnderPointswapChildrenswapChildrenAtnumChildrentabChildrenmouseChildrenwidthstageWidthfullScreenWidthheightstageHeightfullScreenHeightqualityalignscaleModedisplayStatefullScreenSourceRectstageFocusRectshowDefaultContextMenucolorCorrectionaddEventListenerdispatchEventhasEventListenerwillTrigger??