# Resize Problem

**URL:** https://forum.kirupa.com/t/resize-problem/302128
**Category:** Uncategorized
**Created:** [December 22, 2009, 7:20am UTC](https://forum.kirupa.com/t/resize-problem/302128 "2009-12-22T07:20:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![da\_hammer](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@da\_hammer](https://forum.kirupa.com/u/da_hammer)
#### Post date: [December 22, 2009, 7:20am UTC](https://forum.kirupa.com/t/resize-problem/302128/1 "2009-12-22T07:20:58Z")

</div>

I am trying to load a FlashPaper swf into a new flash project. The reason is to disable the print capability. Which i managed to accomplish.  
But when i publish am not able to resize to the browser size. As in its not exactly scaling to the browser size. By the way am publishing under Flash Player 7 settings.

```php

function loadFlashPaper(
   path_s, // path of SWF to load
   dest_mc, // MC which we should replace with the SWF
   width_i, // new size of the dest MC
   height_i, // new size of the dest MC
   loaded_o) // optional: object to be notified that loading is complete
{
   var intervalID = 0;
   var loadFunc = function()
   {
      dest_mc._visible = false;
      var fp = dest_mc.getIFlashPaper();
      if (!fp)
         return;
      if (fp.setSize(width_i, height_i) == false)
         return;
      dest_mc._visible = true;
      clearInterval(intervalID);
      loaded_o.onLoaded(fp);
   }
   intervalID = setInterval(loadFunc, 100);
   dest_mc.loadMovie(path_s);
}
var loadNotifier:Object = new Object;
loadNotifier.onLoaded = function(fp:Object):Void
{
   fp.setCurrentZoom(33);
   fp.setCurrentPage(fp.getNumberOfPages());
};

var loadNotifier:Object = new Object;
loadNotifier.onLoaded = function(fp:Object):Void
{
   fp.showUIElement("Print", false);
   fp.showUIElement("Find", false);
   fp.showUIElement("Pop", false);
   fp.showUIElement("Tool", false);
   fp.addListener(this);
};
loadNotifier.onPageChanged = function(newPageNumber:Number):Void
{
   trace("You have scrolled to page "+newPageNumber);
};
loadNotifier.onZoomChanged = function(percent:Number):Void
{
   trace("You have zoomed to "+percent+"%");
};

loadFlashPaper("RF81-113-137.swf", fp_mc, 550, 400, loadNotifier);

// Position the document clip on the stage:
AS2
Stage.align="TL";
Stage.scaleMode = "Scale";

var myListener:Object = new Object();
myListener.onResize = function () {
    fp_mc._x = Stage.width/2;
    fp_mc._y = Stage.height/2;
}
Stage.addListener(myListener);
// later, call Stage.removeListener(myListener)

//hide right click context menu
stop();
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;

```

Seniors from here should be able to spot on, where i went wrong.  
Someone point me in the right direction.  
Thanks in advance 🙂
