Well first off, any code auto generated by Flash is junk, don't use it. Any code auto generated by DreamWeaver is junk, don't use it.
Learn to hand code a little bit and you'll have much more control and it will be done right.
Using swfobject and alt content is a topic near and dear to my heart, and I've written many posts detailing how.... so my advice...Go back to using swfobject. But to make it simple, use swfobject.js version 1.5, not the latest version.
If you can't find it else where on the Internet, you can download from my site here:
Put that file in a folder where you can find it and path to it in your <head> like this:
of course be sure to edit the path so it works on your site.
The idea of using swfobject is that if it detects the Flash plugin, it will replace the "alt content" with the Flash content. This applies to just one <div>, the container which will hold your Flash content.
The good part is, that one <div> can contain any number of child <div>s, any type of HTML text, anchor links, images, lists, even another type of media player... so that your Flash video will play on an iPhone (actually it's the alt content video that plays, but the viewer doesn't know that).
Great for SEO, provides alt navigation to other pages if needed, plus, can get your Flash stuff into the iPhone... sort of anyway.
So when laying out your Web page, create the <div> that will eventually hold your Flash. Then create ALL the all content... and don't skimp..SEO is important so use plenty of text...you could even include a complete text narration of a video.
So get all the alt content finished and displaying correctly FIRST, before you try to add the Flash. Once you've got that, then add the <script> that swfobject is expecting. It will look something like this:
<div id="slide_show" />
All your alt content goes here... any type of html can be put here, text, images, links list, etc.
var so = new SWFObject("slide_show/hie_ss_new.swf", "slide_show", "350", "310", "8", "#ffffff");
<!-- close slide_show -->
of course edit the params to fit your site.
More discussions here:
Create a unique word in your alt content to measure how long it takes Google to index the alt content:
Flash and SEO (alt content):
Compare Flash displayed on Web page with alt content in source code:
Flash that plays on iPhone (or at least the alt content does), also illustrates how to sandwich Flash between 2 layers of HTML:
View the source code to see how it's done.
Alt content?? I'M ALL FOR IT!!
Hey Adninjastrator, Thanks for the info. I have done all this previously with SWF Object 2.0, just had a go with the 1.5 version and still having no luck. Heres what Ive done:
Uploaded the swfobject.js file to my root directory.
uploaded a file called 'cracktest.swf' (also to the root directory)
And added the following to the HTML in the page:
var so = new SWFObject("cracktest.swf", "cracktest", "350", "310", "8", "#ffffff");
<!-- close slide_show -->
Still coming up with nothing. Is there something daft Im missing?
swfobject works by replacing the content of a <div>,
it will not write cracktest, the ,swf, it will rewrite the contents of your <div>
you are asking it to replace the contents of a <div id="cracktest">
Is that the id given to that <div>?
If not, change the "so.write" to the id name given to the <div> holding your Flash content and it will work.
Superstar! This works a treat. Thank you very much!