salut,
j'essaie de faire un diaporama dynamique. J'arrive à charger mes photos et a les faire defiler mais je n'arrive pas à les redimensionner.
Dans la fonction slideShow() (ci dessous) si je commente la ligne "container.onLoadInit = resizeImg();" mon animation marche, si je décommente ça ne marche pas...
Un avis sur ce qui coince?
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 var i:Number=0; var pArray:Array; var path:String; var externalData:LoadVars = new LoadVars(); externalData.onLoad = function(){ pArray = externalData.plist.split("#"); _root.createEmptyMovieClip("container",1); } externalData.load("photo_list.php","0","POST"); setInterval(slideShow, 1000); function slideShow() { path = "slideshow_pictures/" + pArray[i]; container.loadMovie(path); //container.onLoadInit = resizeImg(); if (i == pArray.length-1){i=0;} else {i++;} } function resizeImg(){ container._width = 500; }
Partager