Bonjour,

j'ai créé une animation flash (galerie d'images polaroids superposées). Je souhaite la disposer en bas à gauche de ma page mais lorsque je mets le code d'un tableau, le swf ne s'affiche plus. Avec d'autres swf cela fonctionne.

Quel est mon erreur ?

index.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<HTML>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
    <TITLE>Campagne</TITLE>
    <!--favicon -->
<LINK REL="SHORTCUT ICON" href="../../favicon2.ico">
<link rel="icon" type="image/gif" href="../../animated_favicon1.gif">
<!--fin favicon -->
 
</head>
<body style="margin:0px" background="/images/campagne3.jpg">
 
    <object id="flashmovie" type="application/x-shockwave-flash" data="gallery.swf" width="100%" height="100%">
        <param name="movie" value="gallery.swf" />
        <param name="wmode" value="transparent">
        <param name="FlashVars" value="<? if(isset($_GET['image'])) echo "topimage=".$_GET['image'] ?>" />
    </object>
 
</body>
</html>
gallery.swf (AS3)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
MovieClip.prototype.addProperty("onLoad", function () {
    return __onLoadHandler__[this];
}, function (f) {
    if (__onLoadHandler__ == undefined) {
        _global.__onLoadHandler__ = {};
    }
    __onLoadHandler__[this] = f;
});
Math.easeInQuad = function(t, b, c, d) {
    return c*(t /= d)*t+b;
};
Math.easeOutQuad = function(t, b, c, d) {
    return -c*(t /= d)*(t-2)+b;
};
Stage.scaleMode = "noScale";
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function() {
    nodes = myXML.childNodes;
    // ----------------------
    // find first image
    // ----------------------
    if (topimage.length) {
        for (var i = 0; i<nodes.length; i++) {
            if (nodes[i].attributes.src == topimage) {
                var insert = nodes.slice(0, i);
                nodes.splice(0, i);
                nodes = nodes.concat(insert);
            }
        }
    }
    _root.gotoAndStop(2);
};
if (_url.indexOf("http")>-1) {
    myXML.load("gallery.php");
} else {
    myXML.load("gallery.xml");
}
stop();
gallery.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
<?
$xml = '<?xml version="1.0"?'.'>';
$handle = opendir(".");
while ( ($file=readdir($handle)) !== false ) {
    if ( !is_dir($file) ){
        $pic = @getimagesize($file);
        if($pic != false && $pic[2] == 2){
            $xml .= '<img src="'.$file.'" width="'.$pic[0].'" height="'.$pic[1].'" />';
        }
    }
}
echo $xml;
?>
gallery.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0"?>
<img src="1.jpg" width="300" height="200" />
<img src="2.jpg" width="300" height="200"/>
<img src="3.jpg" width="300" height="200"/>
<img src="4.jpg" width="300" height="200"/>
<img src="5.jpg" width="300" height="200"/>
<img src="6.jpg" width="300" height="200"/>
<img src="7.jpg" width="300" height="200"/>
<img src="8.jpg" width="300" height="200"/>
<img src="9.jpg" width="300" height="200"/>
<img src="10.jpg" width="300" height="200"/>
<img src="11.jpg" width="300" height="200"/>
<img src="12.jpg" width="300" height="200"/>
<img src="13.jpg" width="300" height="200"/>
<img src="14.jpg" width="300" height="200"/>
merci d'avance !