views:

328

answers:

2

Can anyone explain how to resize the you tube player from with actionscript3.0 code. I can get the you tube player swf to load into my application with the following code, however I am having trouble resizing the player.

var request = new URLRequest("http://www.youtube.com/v/_UNgokP71tw");
request.method = URLRequestMethod.GET;
youTubeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
Security.allowDomain("*");
youTubeLoader.load(request);
A: 

Can't you just change the .width & .height of the youtube object? Or am I missing something here? One gotcha may be that you need to wait until it's fully loaded before you can resize it.

davr
Width and Height do not work for some reason, but I tried scaleX and scaleY, and they worked. Thanks for leading me in the right direction.
ForYourOwnGood
you cannot access .width or .height you need to use setSize(width, height)
undefined
A: 

You need to use setSize(width, height) to change the size of youtube player.

undefined