I am looking to read the value of the allowScriptAccess tag so that if it is set to "never", or if it isn't set that I won't attempt to make an ExternalInterface call. Using the flex framework I can use Application.application. Is there an equivalent for Flash?
Such information along with any query string parameter can be accessed via the flashVars property. You can access the flashVars properties. Read this for a detailed discussion. The Flash equivalent of Application.application.parameters
is stage.loaderInfo.parameters
.
This blog explains how you can do this in a consistent manner.
It seems pretty well documented that accessing these parameter values is not possible from either Flex or Flash. Flashvars can be accessed as is being suggested by the previous answer, but parameter values of the object tag cannot.
There is no way to access the allowScriptAccess value directly, but you can pretty easily determine whether you are able to make an ExternalInterface call simply by using a try-catch.
try
{
ExternalInterface.call( 'document.getElementById', 'NOELEMENTBYTHISNAME' );
allowScriptAccess = true;
}
catch( err:SecurityError )
{
allowScriptAccess = false;
}
You can then use your allowScriptAccess to determine application control flow to avoid making any further ExternalInterface calls.