Loading...
flash

Insérer du flash dans une page HTML, nouvelle solution

Installer du Flash sur son site est toujours problématique. Soit un navigateur n’affiche pas le Flash soit comme sur Explorer 6 il faut cliquer deux fois pour activer le Flash.

De plus les diverses méthodes ne sont pas XHTML.

Pour palier à tous ces problèmes, une solution javascript existe c’est SWFOBJECT. Le code est disponible sur le site Google ici

Et voici un exemple de code pour insérer le flash avec SWFOBJECT:

<!DOCTYPE html PUBLIC « -//W3C//DTD XHTML 1.0 Strict//EN » « http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd »>
<html xmlns= »http://www.w3.org/1999/xhtml » lang= »en » xml:lang= »en »>
<head>
<title>SWFObject dynamic embed – step 3</title>
<meta http-equiv= »Content-Type » content= »text/html; charset=iso-8859-1″ />
<script type= »text/javascript » src= »swfobject.js »></script>

<script type= »text/javascript »>
swfobject.embedSWF(« myContent.swf », « myContent », « 300 », « 120 », « 9.0.0 »);
</script>

</head>
<body>
<div id= »myContent »>
<p>Alternative content</p>
</div>
</body>
</html>

Andrea Giammarchi propose sur son site une alternative pour insérer du flash. A partir de la solution Satay il a développé un javascript trés léger seulement 999 bytes. Si l’utilisateur n’a pas javascript il verra un contenu alternatif.
Cette solution fournit donc le script javascript anyIEActiveX et deux flash flash.swf et fail.swf .
Cette solution est valide XHTML. Elle résoud les problèmes d’activation du flash avec Explorer et Opéra.

Un exemple du code :

<script type= »text/javascript » src= »anyIEActiveX.js »><!–// (C) Andrea Giammarchi //–></script>
</head>
<body>
<object type=”application/x-shockwave-flash” data=”flash.swf?v=8&swf=8.swf” width=”500? height=”300?>
<param name=”movie” value=”flash.swf?v=8&swf=8.swf” />
<p>Texte alternatif</p>
</object>
v=8 pour la version de flash minimale
swf=8.swf votre flash

65 comments
  1. stephen curry shoes

    I wish to get across my love for your kindness for visitors who absolutely need help on that concept. Your special commitment to passing the message all through appeared to be astonishingly beneficial and have really permitted people just like me to attain their endeavors. Your informative instruction means this much a person like me and extremely more to my office workers. Regards; from all of us.

  2. curry 6

    I needed to write you one very little note in order to give many thanks as before for your extraordinary information you have documented here. It’s quite particularly open-handed with you to offer unhampered all a lot of folks would have marketed for an e-book to generate some cash on their own, especially since you might have tried it if you desired. The smart ideas likewise acted to become good way to be certain that other individuals have similar dreams much like mine to know many more in respect of this condition. I think there are several more enjoyable opportunities in the future for folks who discover your blog.

  3. off white clothing

    I wish to show my respect for your generosity giving support to women who really need help on your situation. Your very own commitment to passing the solution around had become quite powerful and has helped those much like me to reach their ambitions. Your own important tips and hints implies this much a person like me and much more to my peers. Thanks a lot; from each one of us.

  4. giannis antetokounmpo shoes

    Needed to create you one tiny word to give many thanks over again for all the exceptional solutions you’ve contributed on this site. It was certainly surprisingly open-handed of people like you to present easily just what a lot of people could have offered for sale for an electronic book in order to make some money for their own end, most notably considering the fact that you could have tried it in case you considered necessary. The suggestions additionally worked to become good way to realize that other people have the same zeal similar to my very own to know the truth significantly more in terms of this condition. I think there are a lot more pleasurable times in the future for individuals who look into your site.

  5. off white

    I actually wanted to jot down a simple word to express gratitude to you for all the pleasant items you are placing on this site. My time-consuming internet look up has at the end of the day been compensated with beneficial information to share with my partners. I ‘d suppose that most of us readers actually are truly blessed to dwell in a magnificent network with many marvellous professionals with interesting ideas. I feel truly blessed to have encountered your site and look forward to plenty of more amazing times reading here. Thank you once again for all the details.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.