1 Reply Latest reply on May 30, 2006 2:31 AM by poonamsheth

    FLEX Flashpaper sizing issue

      I have down loaded the demo of Flashpaper2 and am able to convert pdf documents to SWF. When I convert a pdf document that is 8.5 x 11 then load it into FLEX the initial size of the swf opened in FLEX is not taking up the same size every time. I tried to resize it with benSum.setSize(h,w) but it still does not work correctly.

      code example:

      <mx:VBox id="flashPaper" label="{ewn.planDetails.benefitSummaryTitle}" height="100%" width="100%" hScrollPolicy="off" vScrollPolicy="off">
      <mx:VBox width="100%">
      <mx:HBox creationComplete="loadBenSum()">
      <mx:Loader id="benSum" autoLoad="false" scaleContent="true"/>


      One of the SWF displays the correct size then the next does not. Is there a way to define the size of the swf?
        • 1. Re: FLEX Flashpaper sizing issue
          poonamsheth Level 1
          well i dont knoe exactly whether the size of swf's can be resized,,
          but definately size of flashpaper can be done..

          see the part of the code am posting below, u might get some logic for ur program.
          its about a issue with loading a swf in flex with the <mx:Loader> tag.

          Loading ColdFusion Generated Flash Paper into a Flex application.

          All you realy have to do is to pass the coldfusion page on the contentPath on the <mx:Loader> tag like this

          <mx:Loader id="myLoader1" contentPath=" http://localhost/cfdocexample.cfm"/>

          The left hand panel is calling a cfdocument while the right hand panel is calling a cfreport

          One note however, you cannot use the print functionality at the moment.

          code part (flashpaperTest.mxml)

          <mx:Application xmlns:mx=" http://www.macromedia.com/2003/mxml" xmlns="*" creationComplete="resizeFlashPapers()">


          function resizeFlashPapers()
          function resizeFlashPaper1()
          var flashPaper1 = myLoader1.content.getIFlashPaper();
          if (flashPaper1 == undefined || flashPaper1.setSize("480","500") == false)
          doLater(this, "resizeFlashPaper1");
          function resizeFlashPaper2()
          var flashPaper2 = myLoader2.content.getIFlashPaper();
          if (flashPaper2 == undefined || flashPaper2.setSize("480","500") == false)
          doLater(this, "resizeFlashPaper2");

          <mx:HDividedBox width="100%" height="100%" >
          <mx anel id="panel1" title="Flash Paper through cfdocument" width="50%" height="100%" >
          <mx:Loader id="myLoader1" contentPath=" http://localhost/cfdocexample.cfm"/>
          </mx anel>
          <mx anel id="panel2" title="Flash Paper through cfreport" width="50%" height="100%" >
          <mx:Loader id="myLoader2" contentPath=" http://localhost/cfrepexample.cfm"/>
          </mx anel>