The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 3 of 3

Thread: What am I doing wrong in embedding SWFObject?

  1. #1

    What am I doing wrong in embedding SWFObject?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xml:lang="en" lang="en"><head><title>Mikerz.com</title>
        
    
    
    <head>        
    (some meta stuff im not showing, here)
    <script type="text/javascript" src="./swfobject/swfobject.js"></script>
            <script type="text/javascript" src="./swfaddress/swfaddress.js"></script>
    
            
    
            <style type="text/css" media="screen">
              html, body, #myContent { height:100%; }
              body { margin:0; padding:0; overflow:hidden; }
            </style></head>
    
    <body>
            <div id="myContent">Flash Goes Here</div>
    <script type="text/javascript">
       var so = new SWFObject('slider.swf', "mymovie", "100%", "100%", "9", "#000000");
       so.write('myContent');
    </script>
    any ideas? Ive been trying to figure it out, but im a bit of a noob at js..

  2. #2
    Hi and welcome to the forums !

    I tested your script here ...there is nothing wrong with your code but you may want to tidy it up a bit. IE you got 2 starting tags for the head section (also - no ending tags for body and html and some weird characters before your doctype) ?! Indent your blocks of code - it really helps to get a better overview of the code !

    Take a look at your reference to src="./swfobject/swfobject.js" - is it correct ?
    Last edited by brianmanden; July 10th, 2008 at 06:01 AM.

  3. #3
    hey thanks for the reply, the code I posted was pretty messy because I cut and pasted from the full html.. it actually did have the proper tags.

    Note: I had a working HTML when I began, but IE totally screwed up loading my SWF so I tried to start over again ( it would load a part of my preloader, and then say swfobject is undefined.. ).

    I ended up going through the SWFObject docs, and used the code generator for a static embed. That still didn't work, so I changed the swfobject path to an absolute one. I ran the flash player uninstaller, and ran the installer. Still no fix.

    I checked it in safari and FF, and it worked- except that the alignment was fugly ( fullbrowser & fullscreen options ), so I fixed THAT with a CSS Style;

    LONG STORY SHORT:( also kinda-sorta cliffs )

    I found out my IE was using flash player 7.0 inexplicably.



    ran the IE installer directly from IE rather than adobe's executable, and it worked fine.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012