G’day guys,
My band has had some photos done, and I’d like to be able to use the photo gallery and get them to choose their favourites - I’m thinking there’d be a checkbox sitting under the photos, and you click on that when you like a photo. There’d then be a submit button, which would output the results to PHP like a contact form, and email it.
Anyone got the time to try this? I reckon photographers would LOVE it, as they’re always sending proofs to clients and getting them to choose favourites.
If you’d like to have a go at altering the code I’m currently using (although if there’s a better version out there I can use that), it’s the simplest one:
 
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
  <images>
  <pic>
  <image>gallery/pic1.jpg</image> 
  <caption>details</caption> 
  </pic>
  </images>
 
stop();
bg_mc._visible = false;
inv_btn._visible = true;
desc_txt._visible = true;
bgd._visible = true;
 unloadMovie(picture);
 function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  description = [];
  thumbnails = [];
  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!";
 }
}
preloader.preload_bar._xscale=0
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
///////////////////////////////////// 
listen = new Object();
listen.onKeyDown = function() {
 if (Key.getCode() == Key.LEFT) {
  prevImage();
 } else if (Key.getCode() == Key.RIGHT) {
  nextImage();
 }
};
Key.addListener(listen);
btns_mc.prev_btn.onRelease = function() {
 prevImage();
};
btns_mc.next_btn.onRelease = function() {
 nextImage();
};
///////////////////////////////////// 
p = 0;
function stuff() {
 preloader._visible = true;
 var filesize = picture.getBytesTotal();
 var loaded = picture.getBytesLoaded();
 
 
 preloader.preload_bar._xscale = 100*loaded/filesize;
 
 if (picture._width) {
  picture._x = bgd._x-picture._width/2;
  picture._y = bgd._y-picture._height/2;
  preloader._visible = false;
  bgd._width += (picture._width-bgd._width)/3;
  bgd._height += (picture._height-bgd._height)/3;
  if (Math.abs(bgd._width-picture._width)<5) {
   bgd._height = picture._height;
   bgd._width = picture._width;
   picture._alpha += 15;
   if (picture._alpha>100) {
    delete this.onEnterFrame;
    preloader.preload_bar._xscale=0
   }
  }
 }
}
function nextImage() {
 if (p<(total-1)) {
  p++;
  picture._alpha = 0;
  picture.loadMovie(image[p], 1);
  _root.onEnterFrame = stuff;
  desc_txt.text = description[p];
  picture_num();
 }
}
function prevImage() {
 if (p>0) {
  p--;
  picture._alpha = 0;
  picture.loadMovie(image[p], 1);
  _root.onEnterFrame = stuff;
  desc_txt.text = description[p];
  picture_num();
 }
}
function firstImage() {
 
  picture._alpha = 0;
  picture.loadMovie(image[0], 1);
  _root.onEnterFrame = stuff;
  desc_txt.text = description[0];
  picture_num();
 
}
function picture_num() {
 current_pos = p+1;
 btns_mc.pos_txt.text = current_pos+" / "+total;
}
Hope someone takes this up, as it’d be truly awesome, I reckon 