# Using image's bitmaps that was loaded from another domain

**URL:** <https://forum.kirupa.com/t/using-images-bitmaps-that-was-loaded-from-another-domain/293969>\
**Category:** flash\
**Created:** [August 6, 2009, 9:48am UTC](https://forum.kirupa.com/t/using-images-bitmaps-that-was-loaded-from-another-domain/293969 "2009-08-06T09:48:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peanch](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@peanch](https://forum.kirupa.com/u/peanch)\
**Post date:** [August 6, 2009, 9:48am UTC](https://forum.kirupa.com/t/using-images-bitmaps-that-was-loaded-from-another-domain/293969/1 "2009-08-06T09:48:01Z")

</div>

Hi everyone,  
I have following problem. I’m loading image from another domain and all is before i try to use it for pattern:

```auto
var pattern = new flash.display.BitmapData(loaded_mc._width, loaded_mc._height,true,0);
pattern.draw(loaded_mc);
....
beginBitmapFill(pattern);

```

i’ve add this line to my code:

```auto
System.security.allowDomain("*");

```

and on the specified domain i have crossdomain.xml

```auto
<?xml version="1.0"?>
<cross-domain-policy>
     <allow-access-from domain="*" />
</cross-domain-policy>

```

BTW, i don’t know why but if i’m load XML from the same domain as image before i load image all works fine. i don’t know why.

Thank you for advance
