3 Replies Latest reply on Jun 9, 2012 6:40 AM by shashra_m

    Flash content not coming with Object tag, without height and width parameters in Firefox..

    shashra_m

      I'm using Object tag to render flash content and when flash is not available, showing alternate image.

      When height and width parameters are not specified, in IE it shows flash with some default dimensions and in Firefox, it doesn't show anything.

       

      Is there a way to solve this, where by default Firefox also shows some content, without height and width parameters.

       

      Sample code:

      <object wmode="transparent" type="application/x-shockwave-flash">

           <param value="product.swf" name="movie">

           <param name="wmode" value="transparent">

           <param value="high" name="quality">

           <div>

                <img title="Alt image text" alt="Alt image text" src="300d_img.jpg">

           </div>

      </object>

        • 1. Re: Flash content not coming with Object tag, without height and width parameters in Firefox..
          robdillon Most Valuable Participant

          This is just a shot in the dark, but why don't you just use the parameters that the plugin expects and have your file display correctly?

          • 2. Re: Flash content not coming with Object tag, without height and width parameters in Firefox..
            adninjastrator Level 4

            Your single <object> code is faulty.

            While you do provide a path to the .swf for IE, which uses the <param>

            <param value="product.swf" name="movie">

             

            .... you don't provide the path for FF, which does not use the <param> but rather uses data="...." as in

            <object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">

              <param name="movie" value="path_to_file/file.swf">

              <param name="SomeOtherParam" value="ParamValue">

            </object>

            Do what you want with W/H, but you still need the data path for FF to work.

            Best wishes,

            Adninjastrator

            • 3. Re: Flash content not coming with Object tag, without height and width parameters in Firefox..
              shashra_m Level 1

              First of all, Thank you.

              Sorry, I was using data attribute for object.

               

              New code:


               

              <object wmode="transparent"  data="product.swf"  type="application/x-shockwave-flash">

                   <param value="product.swf" name="movie">

                   <param name="wmode" value="transparent">

                   <param value="high" name="quality">

                   <div>

                        <img title="Alt image text" alt="Alt image text" src="300d_img.jpg">

                   </div>

              </object>

               

               

               

              I had to show alternate image in the place of flash, when a browser cannot show flash content.

              For which I have written new code. But new code is not showing flash content in firefox when height and width parameters are not there.

               

              The following code was able to show flash without height and width, in both IE and firefox.

              It was showing for some dimension, around 200 x 200 pixels.

               

               

              Old Code:

              <object

                   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"     

                   wmode="transparent"

                   classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">

                   <param value="product.swf" name="movie">

                   <param name="wmode" value="transparent">

                   <embed

                        pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"           wmode="transparent"

                        type="application/x-shockwave-flash"

                        src="product.swf">

                   </embed>

              </object>

               

               

              I wanted this, as both implementations are existing in the system. In the old implementation, user browses for a flash file, and in the area to show flash, some flash content is shown, after which user adjusts height and width. For new implementation, after browsing the flash file, nothing is shown to the user before he inputs some height and width. This leads to some confusion.

               

              What is the magic the old code is doing, to show the flash content, without height and width parameters.

               

              Thank you.