Quantcast
Channel: Adobe Community : Popular Discussions - Flex (Read Only)
Viewing all articles
Browse latest Browse all 46188

SecurityError: Error #2122: Security sandbox violation: BitmapData.draw

$
0
0
Hi,
In my application, there are three servers 1)Application server 2)File Server 3)Database Server
I am having a datagrid in which the images(png) are to be displayed. These images are to be accessed from a folder in the file server. Now, what is happening is when i try to move from the tab containing the datagrid to another tab i am getting the following error.
SecurityError: Error #2122: Security sandbox violation: BitmapData.draw:http://www.somex.com/AdminHome.swf cannot accesshttp://ipaddress:8080/somex/png/20080717040251748.AVI-0000.png. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
ipaddress here is the ip of the file server(i modified it when posting here).
I googled it and found that there should be crossdomain.xml file in file server.Following is my crossdomain.xml
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>

I changed my code in Flex file as follows:
<mx:DataGridColumn headerText="Video" width="72">
<mx:itemRenderer>
<mx:Component>
<mx:Image source="{data.thumbnail_path}" initialize="imageInit()" loaderContext="{loaderContext}" height="50" width="70">

<mx:Script>
<![CDATA[
[Bindable]
var loader : LoaderContext;
private function imageInit() : void
{

loader = new LoaderContext();
loader.checkPolicyFile = true;
}

]]>
</mx:Script>
</mx:Image>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
But still iam getting the same error. Please suggest me some solution.
Thanks in advance

Viewing all articles
Browse latest Browse all 46188

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>