Hello,
I am trying to develop a relatively simple (to those that know actionscript!) rotating photo gallery in Flash, whereby images are read in dynamically via an XML file. I have a movieclip created called "image" and an action layer at frame 1, that contains all of the programming for photo transitions, etc. I have the XML part figured out; I just can't seem to get the images to do what I need them to do. There are 6 images (image1, image2, etc.) and they need to fade in and out, as well as move from side to side and/or scale out. As it stands now, I have each image fading in, then that image disappears abruptly and the next image fades in, etc. You can see what it looks like at:
http://65.110.95.2/thetroutfly/photos3.htmlWhat I need it to look like is something like how the picture rotation is done on the home page of:
http://taylorcreek.com (except that I need the rotation to be an endless loop, rather than stopping after the last image was loaded)
or the home page of:
http://performanceanglers.comI basically just need to know how to move an image from left to right or up and down as it fades in, scale it out, while fading it out, as the next image fades in (so they overlap during the fade in/fade out process), with movement, or some variation, therein. I believe that the left/right movement involves _x and _y coding, and the scaling would use _height and _width, but I just can't figure out how to indicate this in the actionscript, as well as getting fading in/out to occur. Nothing I try seems to work properly.
My complete actionscript currently is:
delay = 5000;
// -----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].chil
dNodes[0].
firstChild
.nodeValue
;
description[i] = xmlNode.childNodes[i].chil
dNodes[1].
firstChild
.nodeValue
;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml")
;
p = 0;
this.onEnterFrame = function() {
if (picture._alpha<100) {
picture._alpha += 2;
}
}
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p]
, 1);
slideshow();
}
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0]
, 1);
slideshow();
}
}
function slideshow() {
myInterval = setInterval(pause_slidesho
w, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
If someone could help with how to incorporate the movement, scaling and fading in/out process, that would be really great. Thanks so much!