?
Solved

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:.swf cannot access file:///C

Posted on 2009-02-19
1
Medium Priority
?
13,086 Views
Last Modified: 2013-11-11
Hi,

I just finished developing my Flex Application (using the Trial Adobe Flex Builder 3.0) and after going to Project > Export Release Build, I can see that when I view my project inside the Adobe Flex software, my application works beautifully.

Now if I go to bin-release\BackupOptimizerPartII.html (where BackupOptimizerPartII.html embeds the .swf file), I keep getting the following error in both FireFox and Internet Explorer:

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/Documents and Settings/paggarwala/Desktop/Flex/bin-release/BackupOptimizerPartII.swf cannot access file:///C:/Documents and Settings/paggarwala/Desktop/Flex/bin-release/Copy of BackupOptimizerPartII.html.
      at flash.external::ExternalInterface$/_initJS()
      at flash.external::ExternalInterface$/addCallback()
      at bridge::FABridge/initializeCallbacks()
      at bridge::FABridge()
      at BackupOptimizerPartII/_BackupOptimizerPartII_FABridge1_i()
      at BackupOptimizerPartII()
      at _BackupOptimizerPartII_mx_managers_SystemManager/create()
      at mx.managers::SystemManager/initializeTopLevelWindow()
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()
      at mx.managers::SystemManager/docFrameListener()

--

I did research online and followed exaclty what Curtis Morley said on his website by removing all the 'same domain' and 'never' tags to 'always' as shown on his site:

http://curtismorley.com/2008/11/01/actionscript-security-error-2060-security-sandbox-violation/

...yet nothing follows through. Does anyone have any clue what the heck is going on? Do I need to purchase the original to get this to work? I need to demo this to my boss in less than 24 hours ON my domain (even with the "trial" written on it).

Shown below is my *.html code that embeds the Flex *.swf file. Any help please? Completely appreciated.


<!-- saved from url=(0014)about:internet -->
<html lang="en">
 
<!-- 
Smart developers always View Source. 
 
This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR. 
 
Learn more about Flex at http://flex.org 
// -->
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
<!--  BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!--  END Browser History required section -->
 
<title>Step 3</title>
<script src="AC_OETags.js" language="javascript"></script>
 
<!--  BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!--  END Browser History required section -->
 
<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 124;
// -----------------------------------------------------------------------------
// -->
</script>
</head>
 
<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
 
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
 
if ( hasProductInstall && !hasRequestedVersion ) {
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;
 
	AC_FL_RunContent(
		"src", "playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", "100%",
		"height", "100%",
		"align", "middle",
		"id", "BackupOptimizerPartII",
		"quality", "high",
		"bgcolor", "#869ca7",
		"name", "BackupOptimizerPartII",
		"allowScriptAccess","always",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	AC_FL_RunContent(
			"src", "BackupOptimizerPartII",
			"width", "100%",
			"height", "100%",
			"align", "middle",
			"id", "BackupOptimizerPartII",
			"quality", "high",
			"bgcolor", "#869ca7",
			"name", "BackupOptimizerPartII",
			"allowScriptAccess","always",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>
<noscript>
  	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="BackupOptimizerPartII" width="100%" height="100%"
			codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
			<param name="movie" value="BackupOptimizerPartII.swf" />
			<param name="quality" value="high" />
			<param name="bgcolor" value="#869ca7" />
			<param name="allowScriptAccess" value="always" />
			<embed src="BackupOptimizerPartII.swf" quality="high" bgcolor="#869ca7"
				width="100%" height="100%" name="BackupOptimizerPartII" align="middle"
				play="true"
				loop="false"
				quality="high"
				allowScriptAccess="always"
				type="application/x-shockwave-flash"
				pluginspage="http://www.adobe.com/go/getflashplayer">
			</embed>
	</object>
</noscript>
</body>
</html>

Open in new window

0
Comment
Question by:piyushdabomb
1 Comment
 
LVL 19

Accepted Solution

by:
Jones911 earned 2000 total points
ID: 23688771
In your MXML do you reference a real path ie c:\something
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question