Bonjour,
Juste une petite question : sur mon site internet, j'ai une animation flash appelant un xml. Jusqu'à aujourd'hui, je n'ai eu aucun souci, tout fonctionnait nickel.
Malheureusement, j'ai fait la mise à jour de mon navigateur (firefox ) pour passer à la version 5.0 ! Erreur monumental : plus aucune animation ...
Quelqu'un saurait-il ce qui cause ce souci ? Voici la structure de mon fichier appelant mon xml (domXML.php):
Code PHP :
function _setXML($file=false, $node=false){
if($file && $node){
/* Initialisation */
$stampnow = time(); // timestamp actuel
$d = new DOMDocument(); // objet dom xml vierge
//$xml_file = 'test.xml'; // fichier xml (indique si chemin est relatif ou absolue
$d->load($file); // chargement du fichier xml || $d->load($xml_file)
$ele = $d->documentElement;
$Image = $ele->getElementsByTagName($node); // sélection des éléments "Image" || $ele->getElementsByTagName('Image')
for($i=0; $i<2; $i++){
foreach($Image as $k => $v){
if ($v->hasAttribute("date")) {
$f_date = explode(" ", $v->getAttribute("date")); // date de validité de l'image
$a_date = explode("-", $f_date[0]); // obtiens la date en array
$a_time = explode(":", $f_date[1]); // obtiens la date en array
$f_stamp = mktime($a_time[0], $a_time[1], $a_time[2], $a_date[1], $a_date[2], $a_date[0]);
if($f_stamp<$stampnow) { // si timestamp fichier inférieur à timestamp maintenant alors
$v->parentNode->removeChild($v); // suppression du child node
$d->save($file); // sauvegarde du fichier xml
}
#echo $v->getAttribute("url").' - '.$v->getAttribute("date").' : '.$k."<br />\n";
}
}
#echo "\n<br />---<br />";
}
}
}
Voici la structure de mon fichier xml :
Code XML :
<?xml version="1.0" encoding="utf-8" ?>
<data>
<!-- SETTINGS -->
<settings>
<transitionsSpeed>.2</transitionsSpeed>
<blurAmount>0</blurAmount>
<blurQuality>0</blurQuality>
<glowColor>0x000000</glowColor>
<glowAmount>5</glowAmount>
<slideshowTime>5</slideshowTime>
<slideshowIdleTime>30</slideshowIdleTime>
<scaleAmount>0</scaleAmount>
<panelsX>0</panelsX>
<panelsY>0</panelsY>
<positionX>0</positionX>
<positionY>0</positionY>
<randomize>false</randomize>
</settings>
<!-- ITEMS -->
<item type="image" linkURL="#" >
<imageUrl>images/mois.png</imageUrl>
<quote><![CDATA[]]></quote>
</item>
</data>
Et enfin mon fichier index.php (dans lequel est mon flash ):
Code PHP :
require('domXML.php');
_setXML('xml/offre1.xml', 'item');
<!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">
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<table border="0" cellspacing="0" cellpadding="0" width="722" class="margespecial" style="margin-bottom:108px;">
<tr>
<td>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','230','height','407','src','flash/concert','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/gastronomie' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="230" height="407">
<param name="movie" value="flash/gastronomie.swf" />
<param name="quality" value="high" />
<embed src="flash/gastronomie.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="230" height="407"></embed>
</object></noscript>
</td>
</tr>
</table>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>
Quelqu'un aurait-il une idée de ce qui cause problème, ou ce qui peut être fait pour éviter que mes animations ne fonctionnent pas ?
Merci d'avance ...