# Actionscripting Problems with Full Screen Resize and Placement of borders

**URL:** <https://forum.kirupa.com/t/actionscripting-problems-with-full-screen-resize-and-placement-of-borders/224471>\
**Category:** flash\
**Created:** [May 2, 2007, 5:18pm UTC](https://forum.kirupa.com/t/actionscripting-problems-with-full-screen-resize-and-placement-of-borders/224471 "2007-05-02T17:18:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbdesignlv](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nbdesignlv](https://forum.kirupa.com/u/nbdesignlv)\
**Post date:** [May 2, 2007, 5:18pm UTC](https://forum.kirupa.com/t/actionscripting-problems-with-full-screen-resize-and-placement-of-borders/224471/1 "2007-05-02T17:18:07Z")

</div>

Alright, so I am having a problem getting my two borders to scale and stay placed at the very bottom and right below the logo I have placed in the upper right. The code is as follows…

stop();

Stage.scaleMode = “noScale”;

var HPositioner:Number = (Math.round((Stage.width - 917) / 2));  
var VPositioner:Number = (Math.round((Stage.height - 700) / 2));

function HPositionCubes () {  
if (Stage.width \>= 917) {  
var HPositioner:Number = (Math.round((Stage.width - 917) /2));  
setProperty(topLeftCube\_mc, \_x, 0 - HPositioner);  
setProperty(topRightCube\_mc, \_x, (917 + HPositioner) - 249);  
setProperty(bottomLeftCube\_mc, \_x, 0 - HPositioner);  
setProperty(bottomRightCube\_mc, \_x, (917 + HPositioner) - 89);  
} else {  
setProperty(topLeftCube\_mc, \_x, 0);  
setProperty(topRightCube\_mc, \_x, 917 - 89);  
setProperty(bottomLeftCube\_mc, \_x, 0);  
setProperty(bottomRightCube\_mc, \_x, 917 - 89);  
}  
}

function VPositionCubes () {  
if (Stage.height \>= 701) {  
var VPositioner:Number = (Math.round((Stage.height - 700) /2));  
setProperty(topLeftCube\_mc, \_y, 0 - VPositioner);  
setProperty(topRightCube\_mc, \_y, 0 - VPositioner);  
setProperty(bottomLeftCube\_mc, \_y, (700 + VPositioner) - 84);  
setProperty(bottomRightCube\_mc, \_y, (700 + VPositioner) - 84);  
} else {  
setProperty(topLeftCube\_mc, \_y, 0);  
setProperty(topRightCube\_mc, \_y, 0);  
setProperty(bottomLeftCube\_mc, \_y, 700 - 84);  
setProperty(bottomRightCube\_mc, \_y, 700 - 84);  
}  
}

HPositionCubes();  
VPositionCubes();

```
setProperty(topborder_mc, _width, Stage.width);
setProperty(bottomborder_mc, _width, Stage.width);  

```

var resizeListener:Object = new Object();  
Stage.addListener(resizeListener);

resizeListener.onResize = function () {  
setProperty(topborder\_mc, \_width, Stage.width);  
setProperty(bottomborder\_mc, \_width, Stage.width);  
HPositionCubes();  
VPositionCubes();  
}

The cubes are the 4 corners of the document… this I am not having a problem with, but the top border and bottom border I am having a problem with. I want the bottom border to stay at the very bottom of the full screen flash document no matter the size of the browser window. Basically I only want the border’s width to resize to the browser, not the height and also stay positioned at the very bottom. As for the top border I want it to be positioned under the topleftcube\_mc. and stay positioned right under the logo at all times no matter how big or small the window. The top border’s width is the only thing I want to scale as well. Any help would be greatly appreciated. Thank you in advance.
