{"id":37,"date":"2008-07-25T08:02:00","date_gmt":"2008-07-25T13:02:00","guid":{"rendered":"http:\/\/thaylin.info\/blog\/?p=37"},"modified":"2009-02-11T14:00:24","modified_gmt":"2009-02-11T19:00:24","slug":"image-loading-with-security-sandbox-fun","status":"publish","type":"post","link":"https:\/\/www.thaylin.com\/blog\/2008\/07\/25\/image-loading-with-security-sandbox-fun\/","title":{"rendered":"Image loading with security sandbox fun."},"content":{"rendered":"<p>Just a note in case anyone runs into this.<\/p>\n<p>Loading an image from an external domain without a crossdomain.xml file can be tricky. typically I want to just grab the content of the loader and use it to be referenced for whatever. But in this case, when loading from an external domain that doesn&#8217;t have a crossdomain.xml file you don&#8217;t have the ability to do this. I ran into this today, as I have a loader that loads content like swfs and images from a domain that isn&#8217;t flash friendly. I found the easiest way to run a check on what you loaded is to just check the url in the loader.<\/p>\n<pre lang=\"actionscript\" line=\"1\" colla=\"+\">\r\nif(myLoader.contentLoaderInfo.url.lastIndexOf(\"swf\")==-1)\r\n{\r\n    trace(\"This is an image\")\r\n}else{\r\n    trace(\"This is a swf and I can access the movie clips within.\")\r\n}<\/pre>\n<p>ok bye<\/p>\n<p>O.o<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a note in case anyone runs into this. Loading an image from an external domain without a crossdomain.xml file can be tricky. typically I want to just grab the content of the loader and use it to be referenced for whatever. But in this case, when loading from an external domain that doesn&#8217;t have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[32,31],"_links":{"self":[{"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/posts\/37"}],"collection":[{"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":3,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thaylin.com\/blog\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}