# Youtube Api Draw

**URL:** <https://forum.kirupa.com/t/youtube-api-draw/323432>\
**Category:** flash\
**Created:** [June 30, 2011, 12:07pm UTC](https://forum.kirupa.com/t/youtube-api-draw/323432 "2011-06-30T12:07:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fikontrollet](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@fikontrollet](https://forum.kirupa.com/u/fikontrollet)\
**Post date:** [June 30, 2011, 12:07pm UTC](https://forum.kirupa.com/t/youtube-api-draw/323432/1 "2011-06-30T12:07:29Z")

</div>

Hi!  
I’m making something that requires me to draw() the youtubeplayer  
Giving me this pretty error:

SecurityError: Error #2121: Security sandbox violation: BitmapData.draw: http://\*\*\*\*\*\*\*\*\*.com/zzz/Main.swf cannot access [http://s.ytimg.com/yt/swfbin/watch\_as3-vflOxxoI4.swf](http://s.ytimg.com/yt/swfbin/watch_as3-vflOxxoI4.swf).

I already have taken these precautions :  
What can possibly be wrong now?

I appreciate any help i can get

```php

this.$loader.load(new URLRequest(this.$url), new LoaderContext(true))

Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("crossdomain.xml");

// crossdomain.xml
<!DOCTYPE cross-domain-policy 
  SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> 
 <cross-domain-policy> 
  <allow-access-from domain="*" /> 
  <allow-access-from domain="*.youtube.com" /> 
  <allow-access-from domain="s.ytimg.com" />
  <site-control permitted-cross-domain-policies="all"/> 
 </cross-domain-policy> 

```
