3 Replies Latest reply on Jun 13, 2007 2:55 PM by tgeiges

    SWFLoader width height Issue

      When I use the SWFLoader to load an swf from a URL it is not using the
      sizes specified in the SWFLoader component that is loading it, the swf
      seems to initially load at whatever size the actual swf is, but after
      the swf has been downloaded fully then the SWFLoader jumps to the
      width/height I specified, so basically all swfs I load start out huge
      then after sever seconds shrink to the size I want them to be. has
      anyone else seen this or know how to remedy this issue?

      (also the element in the swf that animate say from outside the
      original swf stage width/height show out way outside the bounds of the
      size specified)

      //set the source(within a function)
      swfplayer.source=" http://www.somedomain.com/myswf.swf";

      <mx:Canvas id="swfplaycontainer" width="452" height="252"
      horizontalCenter="0" verticalCenter="0">
      <mx:SWFLoader id="swfplayer" width="100%" height="100%"/>

      Also tried with no Canvas...

      <mx:SWFLoader id="swfplayer" width="452" height="252" width="100%"

      Thanks, Tim

      specified size does not take effect until fully loaded swf
        • 1. Re: SWFLoader width height Issue
          ntsiii Level 3
          Maybe explicitly set scaleContent="true"? that is the default, but...

          I have not seen this myself.

          Also, as a test, try setting the SWFLoader to explicit size. Perhaps it is a timing issue.

          • 2. Re: SWFLoader width height Issue
            ntsiii Level 3
            Another workaround possibility:
            Set the SWFLoader visibl=false;, then make it visible on the application.complete event.

            • 3. Re: SWFLoader width height Issue
              tgeiges Level 1
              hmm, well I tried explicitly setting the widht/height of the SWFLoader to no avail, I just tried the scaleContent, it also did not work ;-( I cannot hide the SWFLoader until complete event because these are long swf animations(they are tutorial videos in swf format) some seem to take 30-60 seconds to fully load(depending on network traffic). They do start playing quite well immediately but the size is messed up until complete, but I would think and explicit size on the SWFLoader should be the definitive answer.