welcome=)
Scotty Hi, I was wondering if you could see my post? called “Newbie needs help with photogallery” I would appreciate it very much since I’m having problems. I followed the tutorial, and made a special folder on my desktop just to test it, but when I wrote the path to the pictures “C:\Documents and Settings\Cinthia\Escritorio\imagenes” it gave me an error saying it couldnt find the pictures. Thank you very much.
Thanks a lot scotty :sure:
Hi Scotty
The stop button works well, it stopped the photo from playing.
I inputed the following code into action layer, and created 2 button with instance (play_btn , stop_btn)
However, when I pressed on the play button, the action will not take place. The photo is still paused.
Following are my code
myInterval = setInterval(this, “changePhoto”, 5000, 1);
play_btn.enabled = 0;
stop_btn.onRelease = function(){
clearInterval(myInterval)
play_btn.enabled = 1;
}
play_btn.onRelease = function(){
this.enabled =0;
myInterval = setInterval(this, “changePhoto”, 5000, 1);
}
Thank in advance
My bad the path is wrong, the “this” in the setInterval refers to the button,try
play_btn.onRelease = function(){
this.enabled =0;
myInterval = setInterval(this._parent, "changePhoto", 5000, 1);
}
scotty(-:
Wow, that worked very well
Thx soooo much Scotty:bounce:
you’re welcome=)
Hi There
I made the foto gallery, everything is working, i had just one question, is it possible to center the picture’s, because when i open it now, and the picture is not big enough, it alignes to the left.
Please help me
Greets from holland
http://www.kirupa.com/forum/showthread.php?t=80278 post #4
scotty(-:
Hi, I’ve used the XML photogallery from the Kirupa tutorial before without any problems. In a new website (www.jardimbotanicodajuda.com) I’m almost finished, I don’t know what’s wrong but the gallery behaves as if it were a slideshow. when I test it on my PC, it works just fine by clicking on the buttons.
anyone with some idea of what might be causing this weird behaviour?
thanks in advance
RF
I suspect it has something to do with the first picture not being loaded as the MC loads. But my XML knowledge doesn’t go deep enough to solve it.
here is my code:
System.useCodepage = true;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("0fotos/13colecbot/pics13colecbot.xml");
/////////////////////////////////////
listen = new Object();
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////preloader////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
thanks again
RF
Could you explain more?
scotty(-:
I have this photo gallery (www.jardimbotanicodajuda.com/13main.html) which works fine on my PC and has worked fine in other websites.
However, when I try to make it work online, it behaves as an almost random slideshow. Once you press the previous photo button, it starts shifting from photo to photo as if it were a slideshow.
Furthermore, while changing from one picture to the next, it doesn’t follow the correct sequence (1, 2, 3, 4, etc…). Instead, it skips one or two pictures, even when you try to browse the gallery with the buttons.
I can’t understand what’s happening because I’ve used the exact same code before and it worked fine. On the same website, I’m using several slideshows with a similar script. I thought that maybe the variables would be messing up between them but I put that hypothesis aside when I isolated the page with the photogallery.
I ran out of ideas. Do you have any?
thanks
RF
No, can you post your files?
scotty(-:
Hi, I’m sending you attached the FLA file and the XML.
thanks for everything
RF
Works fine here, but I see no slideshow code?
scotty(-:
Hi scotty,
It works fine on my PC as well. The problem comes when I upload it to the server. And it’s not a problem of paths because both the caption and the picture are found by the swf and XML files. It just doesn’t run properly.
The slideshow code is on the first frame of the “actions” layer in the 13main.fla file.
thanks
RF
Anyone else has any idea of what might be wrong?
thanks
RF
If I look at the link, it can’t find the first picture, check the paths.
scotty(-: