# Stuck/Frustrated - MovieClip help/Youtube API

**URL:** <https://forum.kirupa.com/t/stuck-frustrated-movieclip-help-youtube-api/321743>\
**Category:** flash\
**Created:** [April 29, 2011, 6:30am UTC](https://forum.kirupa.com/t/stuck-frustrated-movieclip-help-youtube-api/321743 "2011-04-29T06:30:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Infamous\_SI](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@Infamous\_SI](https://forum.kirupa.com/u/Infamous_SI)\
**Post date:** [April 29, 2011, 6:30am UTC](https://forum.kirupa.com/t/stuck-frustrated-movieclip-help-youtube-api/321743/1 "2011-04-29T06:30:04Z")

</div>

It seems to me that all I need is to get my youtube chromeless player that I’ve loaded in the place I want it to be.

![](http://forum.kirupa.com/uploads/kirupa/6522/ab148d53ae1b4246.png)

Preview ^ As you can see it’s not loaded into my MovieClip! Though it IS loaded, it plays, it’s the right size! Just not in the right position. I’ve tried everything I can think of!

I’m hoping one of you can spot me here and be my life saver. Been stuck here and sitting on this code for a couple of days, REALLY WANT TO MOVE ON!

Here’s my code (AS3)

```auto
Security.allowDomain("www.youtube.com");
Security.allowDomain("http://s.ytimg.com/");
Security.allowDomain("http://i.ytimg.com/");

var my_player:Object;

var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
my_loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);

function onLoaderInit(e:Event):void{
addChild(my_loader);
my_player = my_loader.content;
my_player.addEventListener("onReady", onPlayerReady);
}

function onPlayerReady(e:Event):void{
my_player.setSize(100,80);
my_player.cueVideoById("_OBlgSz8sSM",0);
}

```

My movie clip instance name is “my\_player”

Any help, I will do my best to try and return the favor! Ask any questions you need to know! (I’m using CS3)

Refer to my sig for mfw I edit the code and keep getting errors \>:(
