<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SecurityError: Error #2122: Security sandbox violation: BitmapData.draw in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241111#M7507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Viewer or API Team,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I ran into a interesting situation today playing with the FlexViewer. I used the Traffic Camera (query widget) and displayed some traffic camera results and then went to print the map and got this application error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: &lt;/SPAN&gt;&lt;A href="http://gislap134/FlexViewer2.2/index.swf/"&gt;http://gislap134/FlexViewer2.2/index.swf/&lt;/A&gt;&lt;SPAN&gt;[[DYNAMIC]]/2 cannot access &lt;/SPAN&gt;&lt;A href="http://www.trimarc.org/images/snapshots/CCTV016.jpg"&gt;http://www.trimarc.org/images/snapshots/CCTV016.jpg&lt;/A&gt;&lt;SPAN&gt;. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Dec 2010 19:59:22 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2010-12-29T19:59:22Z</dc:date>
    <item>
      <title>SecurityError: Error #2122: Security sandbox violation: BitmapData.draw</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241111#M7507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Viewer or API Team,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I ran into a interesting situation today playing with the FlexViewer. I used the Traffic Camera (query widget) and displayed some traffic camera results and then went to print the map and got this application error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: &lt;/SPAN&gt;&lt;A href="http://gislap134/FlexViewer2.2/index.swf/"&gt;http://gislap134/FlexViewer2.2/index.swf/&lt;/A&gt;&lt;SPAN&gt;[[DYNAMIC]]/2 cannot access &lt;/SPAN&gt;&lt;A href="http://www.trimarc.org/images/snapshots/CCTV016.jpg"&gt;http://www.trimarc.org/images/snapshots/CCTV016.jpg&lt;/A&gt;&lt;SPAN&gt;. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 19:59:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241111#M7507</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-29T19:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: SecurityError: Error #2122: Security sandbox violation: BitmapData.draw</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241112#M7508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem today! There is a solution pleace? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Michele&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 05:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241112#M7508</guid>
      <dc:creator>FernandoPanetta</dc:creator>
      <dc:date>2011-03-08T05:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: SecurityError: Error #2122: Security sandbox violation: BitmapData.draw</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241113#M7509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;today I investigated for this problem and I discovered that possible solution: crossdomain.xml into server where are the pictures.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For exsample the picture of flicker use different crossdomain:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://api.flickr.com/crossdomain.xml" rel="nofollow"&gt;http://api.flickr.com/crossdomain.xml&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://farm1.static.flickr.com/crossdomain.xml" rel="nofollow"&gt;http://farm1.static.flickr.com/crossdomain.xml&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://farm2.static.flickr.com/crossdomain.xml" rel="nofollow"&gt;http://farm2.static.flickr.com/crossdomain.xml&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://farm3.static.flickr.com/crossdomain.xml" rel="nofollow"&gt;http://farm3.static.flickr.com/crossdomain.xml&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://farm4.static.flickr.com/crossdomain.xml" rel="nofollow"&gt;http://farm4.static.flickr.com/crossdomain.xml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For call the crossdomain you must set a "Security.loadPolicyFile(url)" !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have modify the infoPopupWidget for auto-load a crossdoamin.xml for every site (if crossdomain exsist into server) creating a function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function security():void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var str:String = data.link;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var myArr:Array = str.split("/");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var crossdomainUrl:String = myArr[0] +"//" + myArr[2] + "/crossdomain.xml"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Security.loadPolicyFile(crossdomainUrl);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I call this function in dataChangeHandler() function :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; private function dataChangeHandler(event:FlexEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (data == null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; _title = data.title || "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; _content = data.content;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; if (_content)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoContent.visible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; //clear picture and link button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.source = "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.visible = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.includeInLayout = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoLink.visible = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoLink.includeInLayout = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; if (data.link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: &amp;quot;2&amp;quot;;"&gt;security();&lt;/STRONG&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var link:String = data.link as String;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var pos:Number = link.length - 4;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var sfx:String = link.substr(pos, 4).toLowerCase();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if ((sfx == ".jpg") || (sfx == ".png") || (sfx == ".gif"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.source = link;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.visible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoImage.includeInLayout = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoLink.text = link;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoLink.visible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoLink.includeInLayout = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This trips function for each site where is a crossdomain but I have a problem if there not exist !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions to solve the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michele&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 12:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/securityerror-error-2122-security-sandbox/m-p/241113#M7509</guid>
      <dc:creator>FernandoPanetta</dc:creator>
      <dc:date>2011-03-08T12:05:06Z</dc:date>
    </item>
  </channel>
</rss>

