Flash + XML (chargement de PDF)

Petit nouveau ! | 1 Messages

19 mars 2011, 02:49

Bonsoir,

Pour commencer, je suis débutant avec le flash et le XML, pourtant j'ai passé beaucoup de temps à chercher une solution, mais pas de chance :s
Le problème c'est que je veux adapter un fichier XML existant (avec le AS) pour pouvoir ouvrir et/ou télécharger des fichiers PDF au lieu des fichiers image/video. Ceci est pour un site totalement en Flash+XML.




Voici le code du fichier XML auquel je veux apporter les modifications:

Code : Tout sélectionner

<?xml version="1.0" encoding="iso-8859-1"?> <galleryXML> <!-- First of all turn off the word wrap option of your XML editor to view this file properly ---------------------------- Gallery Settings ---------------------------- + galleryTitle: This is an optional text that will appear on above of the gallery. + thumbWidth: This is the width in pixels every thumbnail in this gallery will have + thumbHeight: This is the height in pixels every thumbnail in this gallery will have + numColumns: This is the number of colums in which all the thumbnails will be divided + numRows: This is the number of rows in which all the thumbnails will be divided + thumbSpace: This is the space in pixels between every thumbnail (Vertically and Horizontally) + frameSpace: This is the space in pixels between the gallery and the frame (organic window behind) --> <gallerySettings galleryTitle = "CATALOGUES" thumbWidth = "175" thumbHeight = "100" numColumns = "4" numRows = "4" thumbSpace = "5" frameSpace = "50" > </gallerySettings> <!-- ---------------------------- Gallery Items ---------------------------- + title: This is an optional text that will appear on top of the big image or swf in bold letter. If you don't want the display the title just leave it this way: title = "" + description: This is an optional text that will appear on top of the big image or swf and beneath the title. If you don't want to display the decription just leave it this way: description = "" + thumbDescription: This is an optional text that will appear on top of the thumbnail image or swf. If you don't want to display the thumbDecription just leave it this way: thumbDescription = "" + imagePath: This is the absolute or relative path of the big image or swf. (if you want to load a video use videoPath) + thumbPath: This is the absolute or relative path of the thumbnail image or swf. + backgroundPath: This is the absolute or relative path of the background image or swf. + url: This is an optional path (relative or absolute) to an external link. If you dont want to display the url button just leave it this way: url = "" ---------------------------- FLV extra parameters ---------------------------- This are some extra parameters in case you want to load a FLV video (check the "Video Gallery.xml" file) : + videoPath: Use videoPath instead of imagePath to load a FLV video using an absolute or relative path. + videoWidth: This is the width in pixels in which the video will be displayed no matter what the actual video's with is. + videoHeight: This is the height in pixels in which the video will be displayed no matter what the actual video's height is. + videoAutoPlay: This parameter lets you decide if you want the video to start playing right away. There is only one of two possible values: 0 = no or 1 = yes + videoBufferTime: This is the number of seconds to buffer in memory before beginning to play the video. If you are not sure what it is just leave it like this: videoBufferTime = "0.1" + videoVolume: This is a number in the range of 0 to 100 that indicates the initial volume control setting. --> <galleryItems> <image title = "COLOR PHOTO 01" description = "PDF 1 EN TEST." thumbDescription = "PDF 1" imagePath = "Galleries/Color Gallery/sourcefl.swf" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 01.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 01.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 02" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 02" imagePath = "http://issuu.com/rbo3joujma/docs/google_ref?mode=a_p" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 02.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 02.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 03" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 03" imagePath = "Galleries/Color Gallery/COLOR 03.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 03.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 03.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 04" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA, PLACERAT AT, VOLUTPAT ET, VESTIBULUM UT, PURUS. NULLA MATTIS PURUS VEL DIAM. INTEGER VOLUTPAT DAPIBUS MAURIS. DONEC ACCUMSAN, MAURIS IN MOLESTIE EUISMOD, ERAT EST ELEMENTUM LOREM, VEL TEMPOR RISUS LECTUS UT DOLOR. NULLA FACILISI. ETIAM NEC LEO SED EST PORTTITOR CURSUS. UT MOLLIS, DIAM IN BLANDIT CONVALLIS, NISL DIAM PHARETRA DOLOR, NEC ULLAMCORPER JUSTO NISI IN NUNC. ETIAM FERMENTUM, SEM NON PHARETRA LUCTUS, DIAM ELIT CONDIMENTUM TURPIS, NON MOLLIS EST ANTE AT TURPIS. NULLA LAOREET ACCUMSAN SAPIEN." thumbDescription = "COLOR 04" imagePath = "Galleries/Color Gallery/COLOR 04.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 04.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 04.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 05" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 05" imagePath = "Galleries/Color Gallery/COLOR 05.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 05.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 05.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 06" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 06" imagePath = "Galleries/Color Gallery/COLOR 01.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 01.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 01.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 07" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 07" imagePath = "Galleries/Color Gallery/COLOR 02.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 02.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 02.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 08" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 08" imagePath = "Galleries/Color Gallery/COLOR 03.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 03.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 03.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 09" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA, PLACERAT AT, VOLUTPAT ET, VESTIBULUM UT, PURUS. NULLA MATTIS PURUS VEL DIAM. INTEGER VOLUTPAT DAPIBUS MAURIS. DONEC ACCUMSAN, MAURIS IN MOLESTIE EUISMOD, ERAT EST ELEMENTUM LOREM, VEL TEMPOR RISUS LECTUS UT DOLOR. NULLA FACILISI. ETIAM NEC LEO SED EST PORTTITOR CURSUS. UT MOLLIS, DIAM IN BLANDIT CONVALLIS, NISL DIAM PHARETRA DOLOR, NEC ULLAMCORPER JUSTO NISI IN NUNC. ETIAM FERMENTUM, SEM NON PHARETRA LUCTUS, DIAM ELIT CONDIMENTUM TURPIS, NON MOLLIS EST ANTE AT TURPIS. NULLA LAOREET ACCUMSAN SAPIEN." thumbDescription = "COLOR 09" imagePath = "Galleries/Color Gallery/COLOR 04.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 04.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 04.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 10" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 10" imagePath = "Galleries/Color Gallery/COLOR 05.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 05.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 05.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 11" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 11" imagePath = "Galleries/Color Gallery/COLOR 01.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 01.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 01.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 12" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 12" imagePath = "Galleries/Color Gallery/COLOR 02.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 02.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 02.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 13" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 13" imagePath = "Galleries/Color Gallery/COLOR 03.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 03.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 03.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 14" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA, PLACERAT AT, VOLUTPAT ET, VESTIBULUM UT, PURUS. NULLA MATTIS PURUS VEL DIAM. INTEGER VOLUTPAT DAPIBUS MAURIS. DONEC ACCUMSAN, MAURIS IN MOLESTIE EUISMOD, ERAT EST ELEMENTUM LOREM, VEL TEMPOR RISUS LECTUS UT DOLOR. NULLA FACILISI. ETIAM NEC LEO SED EST PORTTITOR CURSUS. UT MOLLIS, DIAM IN BLANDIT CONVALLIS, NISL DIAM PHARETRA DOLOR, NEC ULLAMCORPER JUSTO NISI IN NUNC. ETIAM FERMENTUM, SEM NON PHARETRA LUCTUS, DIAM ELIT CONDIMENTUM TURPIS, NON MOLLIS EST ANTE AT TURPIS. NULLA LAOREET ACCUMSAN SAPIEN." thumbDescription = "COLOR 14" imagePath = "Galleries/Color Gallery/COLOR 04.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 04.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 04.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 15" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 15" imagePath = "Galleries/Color Gallery/COLOR 05.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 05.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 05.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 16" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 16" imagePath = "Galleries/Color Gallery/COLOR 01.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 01.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 01.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 17" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 17" imagePath = "Galleries/Color Gallery/COLOR 02.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 02.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 02.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 18" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 18" imagePath = "Galleries/Color Gallery/COLOR 03.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 03.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 03.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 19" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA, PLACERAT AT, VOLUTPAT ET, VESTIBULUM UT, PURUS. NULLA MATTIS PURUS VEL DIAM. INTEGER VOLUTPAT DAPIBUS MAURIS. DONEC ACCUMSAN, MAURIS IN MOLESTIE EUISMOD, ERAT EST ELEMENTUM LOREM, VEL TEMPOR RISUS LECTUS UT DOLOR. NULLA FACILISI. ETIAM NEC LEO SED EST PORTTITOR CURSUS. UT MOLLIS, DIAM IN BLANDIT CONVALLIS, NISL DIAM PHARETRA DOLOR, NEC ULLAMCORPER JUSTO NISI IN NUNC. ETIAM FERMENTUM, SEM NON PHARETRA LUCTUS, DIAM ELIT CONDIMENTUM TURPIS, NON MOLLIS EST ANTE AT TURPIS. NULLA LAOREET ACCUMSAN SAPIEN." thumbDescription = "COLOR 19" imagePath = "Galleries/Color Gallery/COLOR 04.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 04.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 04.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 20" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 20" imagePath = "Galleries/Color Gallery/COLOR 05.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 05.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 05.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 21" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 21" imagePath = "Galleries/Color Gallery/COLOR 01.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 01.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 01.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 22" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 22" imagePath = "Galleries/Color Gallery/COLOR 02.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 02.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 02.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 23" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 23" imagePath = "Galleries/Color Gallery/COLOR 03.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 03.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 03.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 24" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA, PLACERAT AT, VOLUTPAT ET, VESTIBULUM UT, PURUS. NULLA MATTIS PURUS VEL DIAM. INTEGER VOLUTPAT DAPIBUS MAURIS. DONEC ACCUMSAN, MAURIS IN MOLESTIE EUISMOD, ERAT EST ELEMENTUM LOREM, VEL TEMPOR RISUS LECTUS UT DOLOR. NULLA FACILISI. ETIAM NEC LEO SED EST PORTTITOR CURSUS. UT MOLLIS, DIAM IN BLANDIT CONVALLIS, NISL DIAM PHARETRA DOLOR, NEC ULLAMCORPER JUSTO NISI IN NUNC. ETIAM FERMENTUM, SEM NON PHARETRA LUCTUS, DIAM ELIT CONDIMENTUM TURPIS, NON MOLLIS EST ANTE AT TURPIS. NULLA LAOREET ACCUMSAN SAPIEN." thumbDescription = "COLOR 24" imagePath = "Galleries/Color Gallery/COLOR 04.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 04.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 04.jpg" url = "http://flashden.net?ref=Betillo555" > </image> <image title = "COLOR PHOTO 25" description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA." thumbDescription = "COLOR 25" imagePath = "Galleries/Color Gallery/COLOR 05.jpg" thumbPath = "Galleries/Color Gallery/Thumbnails/COLOR 05.jpg" backgroundPath = "Galleries/Color Gallery/Backgrounds/COLOR 05.jpg" url = "http://flashden.net?ref=Betillo555" > </image> </galleryItems> </galleryXML>









Et ceci est le code AS :

Code : Tout sélectionner

//----------- GALLERY ---------------- thumbnailMC._visible = false; previousButtonMC._alpha = 0; previousButtonMC.button.enabled = false; nextButtonMC._alpha = 0; nextButtonMC.button.enabled = false; titleMC._alpha = 0; var galleryTitle; var thumbWidth; var thumbHeight; var numColumns; var numRows; var thumbSpace; var frameSpace; var numDisplay; var galleryWidth; var galleryHeight; var imageInfoArray = new Array(); var loadedImagesIndex = 0; var totalImages; var selectedImage; var backgroundURL; function setBackgroundURL(url){ backgroundURL = url; } function zoomToGallery(){ trace("zoomToGallery"); _root.windowMC.zoomTo(galleryWidth, galleryHeight); _root.windowMC.windowCaller = "zoomToGallery"; } function showGallery(){ _root.galleryCentered(); this._visible = true; if(this._alpha < 100){ this.tween("_alpha",100,.5,"linear"); } if(_root.backgroundMC.imagePath != backgroundURL){ _root.backgroundMC.changeBackgroundImage(backgroundURL); } //showButtons(); } function hideGallery(url){ this.tween("_alpha",0,.5,"linear",0,function(){ this._visible = false; if(url != undefined){ _root.imageViewerMC.loadSWF(url); } }); } function showButtons(){ trace("showButtons"); _root.galleryCentered(); titleMC._x = Math.round(_root.windowMC._width/2) - Math.round(titleMC._width/2); titleMC._y = - titleMC._height; titleMC._visible = true; titleMC.tween("_alpha",100,.5,"linear"); if(loadedImagesIndex-numDisplay-1 >= 0){ previousButtonMC._x = -previousButtonMC._width; previousButtonMC._y = Math.round(_root.windowMC._height/2 - previousButtonMC._height/2); previousButtonMC._visible = true; previousButtonMC.tween("_alpha",75,.5,"linear",0,function(){ this.button.enabled = true; }); }else{ previousButtonMC.button.enabled = false; previousButtonMC.tween("_alpha",0,.5,"linear"); } if(loadedImagesIndex+1 <= totalImages){ nextButtonMC._x = _root.windowMC._width + nextButtonMC._width; nextButtonMC._y = Math.round(_root.windowMC._height/2 - nextButtonMC._height/2); nextButtonMC._visible = true; nextButtonMC.tween("_alpha",75,.5,"linear",0,function(){ this.button.enabled = true; }); }else{ nextButtonMC.button.enabled = false; nextButtonMC.tween("_alpha",0,.5,"linear"); } } nextButtonMC.button.onRollOver = function(){ this._parent.tween("_alpha",100,.5,"linear"); } nextButtonMC.button.onRollOut = function(){ this._parent.tween("_alpha",75,.5,"linear"); } nextButtonMC.button.onReleaseOutside = function(){ this._parent.tween("_alpha",75,.5,"linear"); } nextButtonMC.button.onRelease = function(){ disableButtons(); nextSetImages(); } previousButtonMC.button.onRollOver = function(){ this._parent.tween("_alpha",100,.5,"linear"); } previousButtonMC.button.onRollOut = function(){ this._parent.tween("_alpha",75,.5,"linear"); } previousButtonMC.button.onReleaseOutside = function(){ this._parent.tween("_alpha",75,.5,"linear"); } previousButtonMC.button.onRelease = function(){ disableButtons(); prevSetImages(); } function disableButtons(){ previousButtonMC.button.enabled = false; nextButtonMC.button.enabled = false; if(previousButtonMC._alpha > 75) previousButtonMC.tween("_alpha",75,.5,"linear"); if(nextButtonMC._alpha > 75) nextButtonMC.tween("_alpha",75,.5,"linear"); } function nextSetImages(){ trace("ImagesIndex Antes: " + loadedImagesIndex); if(loadedImagesIndex+1 <= totalImages){ if(totalImages - loadedImagesIndex >= numDisplay){ createGallery(loadedImagesIndex, loadedImagesIndex+numDisplay); }else{ createGallery(loadedImagesIndex, loadedImagesIndex + (totalImages-loadedImagesIndex)); } } trace("ImagesIndex Despues: " + loadedImagesIndex); } function prevSetImages(){ trace("ImagesIndex Antes: " + loadedImagesIndex); if(loadedImagesIndex-numDisplay-1 >= 0){ if(loadedImagesIndex == totalImages){ var module = loadedImagesIndex%numDisplay; if(module == 0){ module = numDisplay; } loadedImagesIndex = loadedImagesIndex - numDisplay - module; }else{ loadedImagesIndex = loadedImagesIndex - numDisplay*2; } createGallery(loadedImagesIndex, loadedImagesIndex+numDisplay); } trace("ImagesIndex Despues: " + loadedImagesIndex); } function setTitle(titleText, beginIndex, endIndex, total){ var format1:TextFormat = new TextFormat(); format1.font = "uni 05_63"; format1.align = "center"; var format2:TextFormat = new TextFormat(); format2.font = "uni 05_53"; format2.align = "center"; if(titleText == "" or titleText == undefined){ titleMC.textBox.text = "[" + (beginIndex+1) + "-" + endIndex + "/" + total+"]"; titleMC.textBox._width = 5000; titleMC.textBox.autoSize = true; titleMC.rectangleMC._width = titleMC.textBox.textWidth + 20; titleMC.textBox._width = titleMC.rectangleMC._width - 10; titleMC.textBox._y = 6; titleMC.textBox.setTextFormat(0,titleMC.textBox.length,format2); }else{ titleMC.textBox.text = titleText + "\n[" + (beginIndex+1) + "-" + endIndex + "/" + total+"]"; titleMC.textBox._width = 5000; titleMC.textBox.autoSize = true; titleMC.rectangleMC._width = titleMC.textBox.textWidth + 20; titleMC.textBox._width = titleMC.rectangleMC._width - 10; titleMC.textBox._y = 2; titleMC.textBox.setTextFormat(0,titleText.length,format1); titleMC.textBox.setTextFormat(titleText.length,titleMC.textBox.length,format2); } } function loadXML(xmlPath){ var myxml = new XML() myxml.ignoreWhite = true; myxml.onLoad = parse; myxml.load(xmlPath) function parse(loaded){ trace("Resultado XML " + loaded); if(loaded){ loadedImagesIndex = 0; myxml=myxml.firstChild var gallerySettings = myxml.childNodes[0].attributes; galleryTitle = gallerySettings.galleryTitle; thumbWidth = Number(gallerySettings.thumbWidth); thumbHeight = Number(gallerySettings.thumbHeight); numColumns = Number(gallerySettings.numColumns); numRows = Number(gallerySettings.numRows); thumbSpace = Number(gallerySettings.thumbSpace); frameSpace = Number(gallerySettings.frameSpace); imageInfoArray = new Array(); var images = myxml.childNodes[1].childNodes; for(var i=0; i < images.length; i++){ if(images[i].attributes.videoPath != undefined){ var tempObject = new Object(); tempObject.title = images[i].attributes.title; tempObject.description = images[i].attributes.description; tempObject.thumbDescription = images[i].attributes.thumbDescription; tempObject.videoPath = images[i].attributes.videoPath; tempObject.videoWidth = Number(images[i].attributes.videoWidth); tempObject.videoHeight = Number(images[i].attributes.videoHeight); tempObject.videoAutoPlay = Boolean(Number(images[i].attributes.videoAutoPlay)); tempObject.videoBufferTime = Number(images[i].attributes.videoBufferTime); tempObject.videoVolume = Number(images[i].attributes.videoVolume); tempObject.thumbPath = images[i].attributes.thumbPath; tempObject.backgroundPath = images[i].attributes.backgroundPath; tempObject.url = images[i].attributes.url; imageInfoArray.push(tempObject); }else{ var tempObject = new Object(); tempObject.title = images[i].attributes.title; tempObject.description = images[i].attributes.description; tempObject.thumbDescription = images[i].attributes.thumbDescription; tempObject.imagePath = images[i].attributes.imagePath; tempObject.thumbPath = images[i].attributes.thumbPath; tempObject.backgroundPath = images[i].attributes.backgroundPath; tempObject.url = images[i].attributes.url; imageInfoArray.push(tempObject); } } totalImages = images.length; numDisplay = numColumns * numRows; galleryWidth = (frameSpace*2 + thumbSpace*(numColumns-1)) + (thumbWidth*numColumns); galleryHeight = (frameSpace*2 + thumbSpace*(numRows-1)) + (thumbHeight*numRows); zoomToGallery(); if(_root.menuMC.playerMC.compareState()){ _root.menuMC.playerMC.PlaySong(); } //createGallery(); _root.generalPreloaderMC.hidePreloader(); _root.generalPreloaderMC.resetPreloader(); _root.preloaderCentered(); for(i=0;i < imageInfoArray.length ; i++){ //trace(imageInfoArray[i].thumbPath); } }else{ trace("Error loading the XML"); _root.menuMC.enableAllButtons(); } } } function hideThumbnails(url){ for(i=0; i < thumbnailArray.length; i++){ thumbnailArray[i].tween("_alpha",0,.5,"linear",0,function(){ this._visible = false; }); } previousButtonMC.tween("_alpha",0,.5,"linear",0,function(){this._visible = false}); nextButtonMC.tween("_alpha",0,.5,"linear",0,function(){this._visible = false}); titleMC.tween("_alpha",0,.5,"linear",0,function(){this._visible = false}); var myInterval = setInterval(doRest,500) function doRest(){ _root.imageViewerMC.hideImage(); _root.galleryMC.loadXML(url); clearInterval(myInterval); } } var thumbnailArray = new Array(); function removeThumbnails(){ while(thumbnailArray.length > 0){ removeMovieClip(thumbnailArray[0]); thumbnailArray.splice(0,1); } } function createGallery(beginIndex, endIndex){ trace("createGallery"); showGallery(); if(endIndex == undefined){ if(imageInfoArray.length > numDisplay){ endIndex = numDisplay; }else{ endIndex = imageInfoArray.length; } } removeThumbnails(); display(); function display(){ setTitle(galleryTitle, beginIndex, endIndex, totalImages); var i = 0; var row = 0; var col = 0; var myThumbInterval = setInterval(makeThumbnail,50); function makeThumbnail(){ //trace("row "+ row +" , "+ col); duplicateMovieClip(_root.galleryMC.thumbnailMC,"thumbnailMC"+i,i); curThumb = _root.galleryMC["thumbnailMC"+ i]; curThumb._width = 0; curThumb._height = 0; curThumb._alpha = 0; curThumb._x = Math.round(_root.windowMC._width/2); curThumb._y = Math.round(_root.windowMC._height/2); curThumb.index = loadedImagesIndex; loadedImagesIndex++; thumbnailArray.push(curThumb); var xtween = (frameSpace + thumbSpace*(col) + thumbWidth*col) + thumbWidth/2; var ytween = (frameSpace + thumbSpace*(row) + thumbHeight*row) + thumbHeight/2; curThumb.tween(["_x", "_y","_alpha"],[ xtween, ytween, 100],.5,"easeOutQuart",0, function(){ this.loadThumbImage(this._parent.imageInfoArray[this.index].thumbPath); this.setThumbDescription(this._parent.imageInfoArray[this.index].thumbDescription); if(this._parent.imageInfoArray[this.index].videoPath != undefined){ this.setVideoPath(this._parent.imageInfoArray[this.index].videoPath); this.setVideoWidth(this._parent.imageInfoArray[this.index].videoWidth); this.setVideoHeight(this._parent.imageInfoArray[this.index].videoHeight); this.setVideoAutoPlay(this._parent.imageInfoArray[this.index].videoAutoPlay); this.setVideoBufferTime(this._parent.imageInfoArray[this.index].videoBufferTime); this.setVideoVolume(this._parent.imageInfoArray[this.index].videoVolume); }else{ this.setImagePath(this._parent.imageInfoArray[this.index].imagePath); } this.setImageTitle(this._parent.imageInfoArray[this.index].title); this.setImageDescription(this._parent.imageInfoArray[this.index].description); this.setImageURL(this._parent.imageInfoArray[this.index].url); this.setBackgroundPath(this._parent.imageInfoArray[this.index].backgroundPath); }); curThumb.tween(["_xscale", "_yscale"],[100,100],1,"easeoutelastic",0,function(){ if(this.index == (endIndex-beginIndex)-1){ if(_root.backgroundMC.imagePath != backgroundURL){ _root.backgroundMC.changeBackgroundImage(backgroundURL); } } }); curThumb.whiteFrameMC.tween(["_width", "_height"],[thumbWidth, thumbHeight], .5 ,"easeoutelastic"); if(col >= numColumns-1){ row++; col = 0; }else{ col++; } i++; if(i >= (endIndex-beginIndex)){ trace("final"); showButtons(); clearInterval(myThumbInterval); } } } }
Je suis complètement perdu depuis des jours, alors toute vos suggestions sont les bienvenues.