# CAlling APPMAin (rezise flash whit browser)

**URL:** <https://forum.kirupa.com/t/calling-appmain-rezise-flash-whit-browser/236758>\
**Category:** flash\
**Created:** [August 23, 2007, 12:56pm UTC](https://forum.kirupa.com/t/calling-appmain-rezise-flash-whit-browser/236758 "2007-08-23T12:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmb](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bmb](https://forum.kirupa.com/u/bmb)\
**Post date:** [August 23, 2007, 12:56pm UTC](https://forum.kirupa.com/t/calling-appmain-rezise-flash-whit-browser/236758/1 "2007-08-23T12:56:20Z")

</div>

I find this package in [http://drawk.wordpress.com/2007/04/15/fluid-flash-layouts/](http://drawk.wordpress.com/2007/04/15/fluid-flash-layouts/)

```php
package
{
 import flash.display.*;
 import flash.events.*;
 import flash.utils.*;
 
 public class AppMain extends MovieClip
 {
  public function AppMain()
  {
   stage.addEventListener(Event.RESIZE,onResize);  
   stage.align = "TL"; // Top left align the stage
   stage.scaleMode = "noScale"; // items do not stretch to fit
  }  
  public function onResize(event:Event) { // In the event call a method to move the items // or, call each item here to be sized movieToBeCentered.x = stage.width/2; movieToBeCentered.y = stage.height/2; movieToBeCentered.scaleX = stage.width * .5; // ... etc } }}

```

I creat a file call AppMain.as, now how can i call inside the flash?

Please advise  
Thanks
