Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2008
    Location
    Liverpool
    Posts
    53
    Thanks
    37
    Thanked 0 Times in 0 Posts

    Question Swfobject not showing flash movie!!!

    Hi,

    I'm trying to get swfobject to work, but for some reason it's not showing the swf movie.

    This is the code in the body:

    Code:
    <script type="text/javascript" src="js/swfobject.js"></script>
    
    <div id="flashcontent">
      This text is replaced by the Flash movie.
    </div>
    
    <script type="text/javascript">
       var so = new SWFObject("slideshow1.swf", "654", "250", "9", "#fff");
       so.write("flashcontent");
    </script>

    I downloaded the latest version of swfobject 2.1, and uploaded it to the js folder. In Flash CS3, I just use the flash format, and publish it.

    I have noticed that there should be an id after "slideshow1"...

    Code:
    var so = new SWFObject("slideshow1.swf", "654", "250", "9", "#fff");

    ... but when I dragged slideshow1.swf into code view in dreamweaver, there doesn't seem to be an id:

    Code:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','654','height','250','src','slideshow1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','slideshow1' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="654" height="250">
      <param name="movie" value="slideshow1.swf" />
      <param name="quality" value="high" />
      <embed src="slideshow1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="654" height="250"></embed>
    </object></noscript>
    So, at the moment it's displaying the replacement text, but not the swf movie. What am I doing wrong here? Any help would be appreciated.

    Many Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Are you using the old code with new sfwobject.js file?
    Check the manual of new version, http://code.google.com/p/swfobject/wiki/documentation
    (scroll down to see the dynamic method)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    snarf1974 (01-11-2009)

  • #3
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Get rid of the AC code! You are using Dreamweaver, and you need to remove anything that Dreamweaver would have inserted into the document before adding the SWFObject code.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • Users who have thanked gnomeontherun for this post:

    snarf1974 (01-11-2009)

  • #4
    New Coder
    Join Date
    Aug 2008
    Location
    Liverpool
    Posts
    53
    Thanks
    37
    Thanked 0 Times in 0 Posts
    Thanks very much, checked the manual of the new version, and now it's working fine.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •