# My Flash application ignores crossdomain.xml. Help!

**URL:** <https://forum.kirupa.com/t/my-flash-application-ignores-crossdomain-xml-help/301411>\
**Category:** flash\
**Created:** [December 9, 2009, 12:47am UTC](https://forum.kirupa.com/t/my-flash-application-ignores-crossdomain-xml-help/301411 "2009-12-09T00:47:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![0L4F](https://avatars.discourse-cdn.com/v4/letter/0/848f3c/32.png) [@0L4F](https://forum.kirupa.com/u/0L4F)\
**Post date:** [December 9, 2009, 12:47am UTC](https://forum.kirupa.com/t/my-flash-application-ignores-crossdomain-xml-help/301411/1 "2009-12-09T00:47:45Z")

</div>

Kirupians,

With a looming deadline for a big project, I’ve just wasted an entire evening trying to find out why my application won’t properly load image content when the .swf is deployed to a web server.

Here’s what I’m trying to do:

- load a jpeg image from a different domain than where my .swf’s are hosted
- turn it into a Bitmap object to apply smoothing

Loading the jpeg itself is no problem, as long as I do this:  
[AS]addChild(loader);[/AS]  
As soon as I try to access **loader.content** , or \*\*loader.contentInfo.content \*\*to create a Bitmap, Flash simply aborts the script.

So there you have it: a typical security sandbox violation (although no error is ever thrown). Solution: crossdomain.xml! Or that’s what I thought.

Now the image host has a crossdomain.xml in it’s root, with \ ***.rocketclowns.com** as an entry. I’m testing my app from [www.rocketclowns.com](http://www.rocketclowns.com).

Even if I try to force load the policy file:

[AS]Security.loadPolicyFile()[/AS]

Or, with LoaderContext:

[AS][COLOR=#808080]_// create a loader context that_[/COLOR]  
[COLOR=#808080]_// checks for policy files_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] context:LoaderContext = [COLOR=#000000] **new** [/COLOR] LoaderContextCOLOR=#000000[/COLOR];  
context.[COLOR=#000080]checkPolicyFile[/COLOR] = [COLOR=#000000] **true** [/COLOR];

[COLOR=#808080]_// use the context with your call to load_[/COLOR]  
myLoader.[COLOR=#0000FF]load[/COLOR][COLOR=#000000]([/COLOR]request, context[COLOR=#000000])[/COLOR];[/AS]

…I still can’t access my loader.content. Help! Is there anything I’ve overlooked, or am I missing something?

Thanks in advance,

0L4F
