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
|
photos_xml = new XML();
photos_xml.ignoreWhite = true;
photos_xml.onLoad = function(ok) {
if (ok) { noeuds = photos_xml.firstChild.childNodes;
nbrPhotos = noeuds.length;
premierePhoto = this.firstChild.firstChild;
dernierePhoto = this.firstChild.lastChild;
enCours = premierePhoto;
affichePhoto(enCours);
} };
photos_xml.load(this._url.slice(0, this._url.lastIndexOf("/")) + "/photos.xml");
function affichePhoto(photo) { ecran.loadMovie(this._url.slice(0, this._url.lastIndexOf("/")) + "/" + photo.attributes.fichier); }
NEXT.onPress=function()
{ if (enCours.attributes.num == nbrPhotos) {enCours = premierePhoto;}
else { enCours = enCours.nextSibling; }
affichePhoto(enCours);}
PREV.onPress=function(){
if (enCours.attributes.num == 1) { enCours = dernierePhoto; }
else { enCours = enCours.previousSibling; }
affichePhoto(enCours);
FRAME3.onPress=function(){gotoAndStop(3)}
} |
Partager