Previously, the Flash file of flex application was built with ant, but it is directly embedded in HTML. If it is locally accessed, an error window is displayed, and the report is as follows:
Securityerror: Error #2060: Security Sandbox violation: externalinterface caller file: // D: /workdir/EOS projects/bps/v6.1/doc/bps61/doc/04_requirement/Draft/bps_ui/build/flowdesigner3.swf cannot access file: // D: /workdir/EOS projects/bps/v6.1/doc/bps61/doc/04_requirement/Draft/bps_ui/build/flowdesigner3.html. <br/> at flash. external: externalinterface $/_ initjs () <br/> at flash. external: externalinterface $/addcallback () <br/> at flowdesigner3/appcomplete () <br/> at flowdesigner3/___ flowdesigner3_application1_1_applicationcomplete ()
This exception occurs because the local file does not have the permission to access Js. You can set the file to access the script when introducing the SWF file in HTML. The following code sets the "allowScriptAccess" parameter to "always": (the following code uses the swfobject component)
<MCE: Script Type = "text/JavaScript" src = "swfobject. JS "mce_src =" swfobject. JS "> </MCE: SCRIPT> </P> <p> <MCE: Script Type =" text/JavaScript "> <! -- <Br/> var flashvars ={}; <br/> var Params ={< br/> allowScriptAccess: "always" <br/> }; <br/> var attributes = {<br/> ID: "flowdesigner" <br/>}; <br/> swfobject. embedswf ("flowdesigner3.swf", "mycontent", "100%", "100%", "9.0.0", "expressinstall.swf", flashvars, Params, attributes ); <br/> // --> </MCE: SCRIPT>
For example, if the object tag is used, it is as follows:
<Param name = "allowScriptAccess" value = "always"/>