# AS3 - Full screen browser errors

**URL:** <https://forum.kirupa.com/t/as3-full-screen-browser-errors/308552>\
**Category:** flash\
**Created:** [April 25, 2010, 4:11pm UTC](https://forum.kirupa.com/t/as3-full-screen-browser-errors/308552 "2010-04-25T16:11:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan008](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Dan008](https://forum.kirupa.com/u/Dan008)\
**Post date:** [April 25, 2010, 4:11pm UTC](https://forum.kirupa.com/t/as3-full-screen-browser-errors/308552/1 "2010-04-25T16:11:09Z")

</div>

CS4-AS3 Full screen browser error

This is my preloader on the first frame.

```auto
stop();   

this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);

function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;

lbar.scaleX=pcent/100;

lpc.text=int(pcent)+"%";

if(pcent==100){
this.gotoAndStop(2);
}
}

```

This is the full screen browser script on the 2nd frame.

```auto
stop()

Stage.scaleMode = "noScale"
Stage.align = "TL";

bg_ratio = bg_mc._width / bg_mc._height;

stageResize();

function stageResize():Void {
    stage_ratio = Stage.width / Stage.height;
    if (stage_ratio >= bg_ratio) {
        bg_mc._width = Stage.width;
        bg_mc._height = bg_mc._width / bg_ratio;
    } else {
        bg_mc._height = Stage.height;
        bg_mc._width = bg_mc._height * bg_ratio;
    }
}

var stageListner:Object = new Object();
stageListner.onResize = function():Void {
    stageResize();
};

Stage.addListener(stageListner);

```

Errors:

```auto
1046: Type was not found or was not a compile-time constant: Void. - function stageResize():Void { - frame 2 line 10

```

```auto
Warning: 1058: Migration issue: The property _height is no longer supported. Use the DisplayObject.height property instead.. - bg_ratio = bg_mc._width / bg_mc._height; - frame 2 line 6

```

I am using AS3 on this project but i am not sure of the scripts are AS2 or AS3. Beginner.  
[URL=“[http://www.kirupa.com/forum/showthread.php?p=2550412#post2550412](http://www.kirupa.com/forum/showthread.php?p=2550412#post2550412)”]
