2 Replies Latest reply on Oct 12, 2009 3:00 PM by jreich1

    Constraining SWF if web browser


      I am new to flash.  I made a little apllication to better display some work.  When dropping the SWF into a web browser, which the client will have to do.  The SWF will size with the size of the browser.  When my images are displayed that size they become pixelated.  How can I constrain my SWF to its original size when a web browser is resized?

        • 1. Re: Constraining SWF if web browser
          Ned Murphy Adobe Community Professional & MVP

          Your best bet is to use an html web page to display the swf file.  The embedding code allows you to specify the size of the displayed file.  You can publish an html file at the same time you publish the swf by selecting the html output option via the Publish Settings

          1 person found this helpful
          • 2. Re: Constraining SWF if web browser
            jreich1 Level 1

            Thank you Ned that worked but i would ideally like to send only the SWF.

            I tried this code and am getting TypeError: Error #1009: Cannot access a property or method of a null object reference.

            import flash.display.Stage;
            import flash.display.StageScaleMode;
            var swfStage:Stage = swfStage
            swfStage.scaleMode = StageScaleMode.NO_SCALE
            Any Ideas