http://www.alistapart.com/articles/...
Ce code ci est valide xhtml
Source : http://pushitup.com/CS/forums/347/S...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Flash XHTML valid</title>
</head>
<body>
<object type="application/x-shockwave-flash" data="images/banner.swf" width="288" height="128">
<param name="movie" value="images/banner.swf" />
<img src="banner.gif" width="288" height="128" alt="banner" />
</object>
</body>
</html>
Voir le forum d’Alsacréations
http://forum.alsacreations.com/topi...
<!--[if !IE]> Standard XHTML object instanciation <!-->
<object id="flash" type="application/x-shockwave-flash" data="monfichier.swf" width="100" height="100">
<!--><![ endif ]-->(sans espace)
<!--[if IE]>
<object id="flash" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" width="100" height="100">
<![ endif ]-->(sans espace)
<param name="movie" value="monfichier.swf" />
</object>
Pour afficher une alternative (texte, image, lien) au cas où le visiteur n’a pas flash
Voir ce site http://veerle.duoh.com/validateflash/
<object type="application/x-shockwave-flash" data="stars.swf width="345" height="150" id="stars" />
<param name="movie" value="stars.swf" />
<img src="images/stars_static.gif" width="345" height="150" alt="stars" id="starsimage" />
</object>
Le mixte de tout ca tiré de ces lecture donne le code valide xhtml suivant pour insérer du flash en offrant une alternative à ceux qui n’ont pas le plug-in :
<!--[if !IE]> Standard XHTML object instanciation <!-->
<object id="flash" type="application/x-shockwave-flash" data="jpgrotator.swf" width="750" height="80">
<!--><![ endif ]-->(sans espace)
<!--[if IE]>
<object id="flash" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" width="750" height="80">
<![ endif ]-->(sans espace)
<param name="movie" value="jpgrotator.swf" />
<img src="squelettes/image.jpg" width="750" height="80" alt="nom" id="nom" />
</object>
Dosimple.ch propose quant à lui deux méthodes :
http://dosimple.ch/articles/Utilisa...
Exemple avec la technique xHTML simple
<object type="application/x-shockwave-flash" data="feuille.swf" width="500" height="400">
<param name="movie" value="feuille.swf" />
<!-- Notre image -->
<img src="feuille.png" alt="une feuille d’arbre" width="500" height="400" alt="" />
</object>
Exemple avec la technique Javascript
<!-- Notre image -->
<img src="feuille.png" id="feuilleAlt" alt="une feuille d’arbre" width="500" height="400 />
<script type="text/javascript">
<!--
if( FlashCanPlay ) /* On teste si on peut afficher du Flash */
{
/* On crée l’animation */
creatFlash("feuille.swf", 500, 400, "high" );
/* On cache l’image */
document.getElementById("feuilleAlt").style["display"]="none";
}
-->
</script>
Bonjour,
Merci pour le lien vers Alsacréations dans votre article.
Cependant, attention à l’orthographe - souvent mal écrite : l’article parle de "Voir le forum d’Alsace création" ; cette orthographe nous donne bien du fil à retordre ! :p
Bonne journée,
Raphaël