SecurityError: Error #2148: SWF 文件 file:///C:/Users/heyj/Desktop/flexchart/bin-debug/orgChartDemo.swf 不能访问本地资源 file:///C:/Users/heyj/Desktop/flexchart/bin-debug/organ.xml。只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源。
?at flash.net::URLStream/load()
?at flash.net::URLLoader/load()
?at com.asia.utils::CommonUtil$/initConfiguration()[D:flexworkSpaceNewOrgDemosrccomasiautilsCommonUtil.as:29]
?at orgChartDemo/application1_creationCompleteHandler()[D:flexworkSpaceNewOrgDemosrcorgChartDemo.mxml:35]
?at orgChartDemo/___orgChartDemo_Application1_creationComplete()[D:flexworkSpaceNewOrgDemosrcorgChartDemo.mxml:6]
?at flash.events::EventDispatcher/dispatchEventFunction()
?at flash.events::EventDispatcher/dispatchEvent()
?at mx.core::UIComponent/dispatchEvent()[E:dev4.xframeworksprojectsframeworksrcmxcoreUIComponent.as:12528]
?at mx.core::UIComponent/set initialized()[E:dev4.xframeworksprojectsframeworksrcmxcoreUIComponent.as:1627]
?at mx.managers::LayoutManager/doPhasedInstantiation()[E:dev4.xframeworksprojectsframeworksrcmxmanagersLayoutManager.as:759]
?at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:dev4.xframeworksprojectsframeworksrcmxmanagersLayoutManager.as:1072]
当将flex工程的bin-debug直接copy出来运行时报上述错误,只需要将 flex编译器下加上
-use-network=false 就行了,但是如果想在tomcat里运行,这句话要去掉