# AS3 Liquid Design, x/y, width/height of FLVPlayback not right

**URL:** https://forum.kirupa.com/t/as3-liquid-design-x-y-width-height-of-flvplayback-not-right/312682
**Category:** Uncategorized
**Created:** [August 10, 2010, 2:17pm UTC](https://forum.kirupa.com/t/as3-liquid-design-x-y-width-height-of-flvplayback-not-right/312682 "2010-08-10T14:17:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![timmy666](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@timmy666](https://forum.kirupa.com/u/timmy666)
#### Post date: [August 10, 2010, 2:17pm UTC](https://forum.kirupa.com/t/as3-liquid-design-x-y-width-height-of-flvplayback-not-right/312682/1 "2010-08-10T14:17:05Z")

</div>

ok guys this is doing my head in, I’ve spent hours on it and can’t figure it out…

my code is:

> function makePlayer():void {  
> my\_player = new FLVPlayback();  
> my\_player.skin=“SkinUnderPlaySeekFullscreen.swf”;  
> my\_player.skinBackgroundColor=0xCCCCCC;  
> my\_player.skinBackgroundAlpha=0.5;  
> my\_player.fullScreenTakeOver=false;  
> my\_player.width=500;  
> my\_player.height=300;  
> my\_player.x=(stage.stageWidth/2)-(my\_player.width/2);  
> my\_player.y=(stage.stageHeight/2)-(my\_player.height/2);  
> trace (stage.stageWidth);  
> trace (stage.stageHeight);  
> trace (my\_player.width);  
> trace (my\_player.height);  
> }  
> Regardless of what size i make my stage, the trace of stage width and height always matches a trace I have on top layer, and the trace of my\_player width and height is always 500 and 300 respectively.

Now the odd thing is,

> ```
> my_player.x=(stage.stageWidth/2)-(my_player.width/2);
> 
> ```

```
my_player.y=(stage.stageHeight/2)-(my_player.height/2);

```

should put my\_player in the center of my screen, well it puts it in the center horizontally, and its a bit lower then center vertically, but the problem is, when i strech my window, then i open an instance of my\_player, it is down in the bottom right corner…If i open the instance of my\_player when the stage is in its original size then its ok, even if i re-size the movie while the player is open it still stays roughly in the center. It’s only an issue if the my\_player is opened after the flash movie has been re-sized from original position…

I have a function that adds and plays the my\_player like this

> function playVideo(e:Event):void {  
> addChild(my\_player);  
> my\_player.playWhenEnoughDownloaded();  
> my\_player.addEventListener(VideoEvent.COMPLETE, thumbOriginal);  
> }  
> any ideas or suggestions would be much appreciated 🙂

**EDIT:** I’ve also tried removing

> my\_player.width=500;  
> my\_player.height=300;  
> and letting the default values be used, but i still get the same problem ☹
