2 Replies Latest reply on Jun 29, 2006 4:04 AM by nsbrown

    launching flashpaper swf from an executable

    manhattanmediaworks
      we have a CD based project that uses a flash executable. We are looking at using Flash Paper for our printing functionality, but when we launch the .swf from an executable it seems to have a predetermined window size and it is too small for our needs. What determines this size? And is there a way we can instruct this window to open in a certain size?

      Thanks.
        • 1. Re: launching flashpaper swf from an executable
          RyanDeluz Level 1
          I just spent all day trying to figure out how to adjust the size of a Flash Paper document. This will set it to your .swf size and also scale it if you stretch the window (combined from various other posts and my own original work)

          Stage.scaleMode = "noScale";
          Stage.align = "TL";
          //create MovieClip holder for FlashPaper
          //create instance of MovieClip holder and place on stage
          var mFlashPaperMC:MovieClip = _root.createEmptyMovieClip("mFlashPaperMC", _root.getNextHighestDepth());
          var mFlashPaper;
          //flash paper interface
          var mFlashPaperListener:Object = new Object();
          mFlashPaperListener.onLoaded = function(mFlashPaper:Object):Void {
          //loading is complete, so we can now adjust the current page, zoom, etc.
          //mFlashPaper.setCurrentPage(mFlashPaper.getNumberOfPages());
          //mFlashPaper.setCurrentZoom(33);
          mFlashPaper.addListener(this);
          };
          //LISTENS FOR RESIZE AND RESIZES FLASH PAPER
          var mStageListener:Object = new Object();
          mStageListener.onResize = function() {
          mFlashPaper.setSize(Stage.width, Stage.height);
          };
          Stage.addListener(mStageListener);
          loadFlashPaper("QuickStartHelp.swf", mFlashPaperMC, Stage.width, Stage.height, mFlashPaperListener);
          stop();
          function loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o) {
          var intervalID = 0;
          var loadFunc = function () {
          dest_mc._visible = false;
          mFlashPaper = dest_mc.getIFlashPaper();
          if (!mFlashPaper) {
          return;
          }
          if (mFlashPaper.setSize(width_i, height_i) == false) {
          return;
          }
          dest_mc._visible = true;
          clearInterval(intervalID);
          loaded_o.onLoaded(mFlashPaper);
          };
          intervalID = setInterval(loadFunc, 100);
          dest_mc.loadMovie(path_s);
          }
          • 2. Re: launching flashpaper swf from an executable
            nsbrown
            Great code and it works! but how do you close the flash paper swf without closing the whole movie??