Image loading with security sandbox fun.

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’t have a crossdomain.xml file you don’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’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.

if(myLoader.contentLoaderInfo.url.lastIndexOf("swf")==-1)
{
    trace("This is an image")
}else{
    trace("This is a swf and I can access the movie clips within.")
}

ok bye

O.o


Posted

in

by

Comments

Leave a Reply