There are 2 ways to use SWFObject. Static Publishing and Dynamic
Publishing. Jump to
http://www.bobbyvandersluis.com/swfobject/generator/index.html and click the
link "What is this?" next to the Publishing Method field for a detailed
explanation.
The method you are using, where you have object tags and use the
SWFObject.register method represents the static publishing method, and is
used by folks who don't want to HAVE to rely on Javascript for all of this
stuff to work. i.e. if you don't have javascript enabled on your browser
the nasty nested object tags you are using will still load the SWF file.
Based on the code sample you submitted above, it's working just as intended.
If you want something cleaner and you are OK with requiring that people
using your site HAVE to have Javascript running to experience your content,
then you might want to consider switching to the dynamic publishing method.
It's cleaner in terms of the code you have to put into your content, and
works just fine in terms of embedding your content.
Use the link above to generate some code for yourself using the dynamic
publishing method, and hopefully you'll see what I mean.
But the test you created for yourself in your previous post isn't really a
test.
Properly done, the code in your body puts the appropriate .swf
("../../flash/V01.swf")you specify on the screen. The only thing your
included javascript files do is execute the javascript that allows SWFObject
to gain control of it.
If you need more help understanding how to set up the dynamic publishing (if
that will meet your requirements), play with the link I posted, or post more
questions/read the documentation.
Vincent
On Sun, Feb 7, 2010 at 7:48 AM, wilson <[email protected]> wrote:
> I am the creator of this post. In my search to solve the problem i
> submitted, i tried as follow:
>
> <script type="text/javascript" src="../../../scripts/swfobject.js"></
> script>
> <script type="text/javascript" src="../../../scripts/registerSWF.js"></
> script>
>
> The goal was to skip the obstrusive Javascript and in place call an
> external .js file into which i register the appropriate swf.
>
> I thought it was working as i was able to SEE the swf, same as when i
> was registering it directly.
>
> To test, i removed those 2 lines and was expecting NOT to see the swf,
> as swfobject.js and registerSWF.js werent called at all.
>
> To my absolute dismay, the swf is still visible and functional! So i
> think it might be the way i embed the Flash. Can someone take a look
> at that?
>
> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> width="512" height="289" id="V01">
> <param name="movie" value="../../flash/V01.swf" />
> <!--[if !IE]>-->
> <object type="application/x-shockwave-flash"
> data="../../flash/
> V01.swf" width="512" height="289">
> <!--<![endif]-->
> <p class="altText10">Cette page contient du contenu vidéo
> nécessitant d'activer Javascript et Abobe Flash Player. Si vous
> désirez ne pas activer ces fonctions, nous vous offrons des images
> provenant des vidéos originaux.</p>
> <img src="../../../imagesVideoAlt/512x288/V-01.jpg"
> alt="Vidéo montrant le travail des biologistes dans les milieux
> humides." width="512" height="258"/>
> <!--[if !IE]>-->
> </object>
> <!--<![endif]-->
> </object>
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.