# Problem with scroll bar in Chrome

**URL:** <https://forum.kirupa.com/t/problem-with-scroll-bar-in-chrome/296250>\
**Category:** flash\
**Created:** [September 11, 2009, 4:49pm UTC](https://forum.kirupa.com/t/problem-with-scroll-bar-in-chrome/296250 "2009-09-11T16:49:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IngJure](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@IngJure](https://forum.kirupa.com/u/IngJure)\
**Post date:** [September 11, 2009, 4:49pm UTC](https://forum.kirupa.com/t/problem-with-scroll-bar-in-chrome/296250/1 "2009-09-11T16:49:10Z")

</div>

Hello,

I am making a full Flash page in AS3. I am trying to make dynamic (elastic) resize, with center/center and bottom/center alligment of window. Here is the site:

> **[Welcome to Ledina](https://www.ledina.org)**
>
> Take a look at Welcome to Ledina at Ledina.

It works in IE7,8 in Firefox and CrazyBrowser, but not in Chrome!  
Can anyone please help me fix this problem.

Thank you,  
Jure

Here is the code:

on first frame…

var myStage:Stage = this.stage;  
myStage.scaleMode = StageScaleMode.NO\_SCALE;  
myStage.align = StageAlign.TOP\_LEFT;

function initialDisplay(event:Event):void {

```
var swfWidth:int = myStage.stageWidth;
var swfHeight:int = myStage.stageHeight;

var PodatkiNaDnuYPos:Number = swfHeight - PodatkiNaDnu.height * 2;
var PodatkiNaDnuXPos:Number = swfWidth - PodatkiNaDnu.width;

var ElementiYPos:Number = swfHeight - Elementi.height;
var ElementiXPos:Number = swfWidth - Elementi.width;

Elementi.y = ElementiYPos / 2;
Elementi.x = ElementiXPos / 2;

PodatkiNaDnu.y = PodatkiNaDnuYPos;
PodatkiNaDnu.x = PodatkiNaDnuXPos / 2;

gotoAndStop(2);

}

addEventListener(Event.ENTER_FRAME,initialDisplay);

```

and second frame…

stop();

function resizeDisplay(event:Event):void {

```
var swfWidth:int = myStage.stageWidth;
var swfHeight:int = myStage.stageHeight;

var PodatkiNaDnuYPos:Number = swfHeight - PodatkiNaDnu.height * 2;
var PodatkiNaDnuXPos:Number = swfWidth - PodatkiNaDnu.width;

var ElementiYPos:Number = swfHeight - Elementi.height;
var ElementiXPos:Number = swfWidth - Elementi.width;

Elementi.y = ElementiYPos / 2;
Elementi.x = ElementiXPos / 2;

PodatkiNaDnu.y = PodatkiNaDnuYPos;
PodatkiNaDnu.x = PodatkiNaDnuXPos / 2;

}

myStage.addEventListener(Event.RESIZE,resizeDisplay);
```
