Ease the transition
How do I ease the photo transition?
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
};
function callThumbs() {
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages.attributes.thumb_url;
myThumb_mc = placeholder.placeholder2.createEmptyMovieClip(i, placeholder.placeholder2.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("http://www.myweb.org/photos/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
fullImg_mc.heading.selectable = false;
fullImg_mc.caption.selectable = false;
};
preloader.onLoadComplete = function(target) {
fullImg_mc.heading.text="";
fullImg_mc.caption.text="";
target.onRelease = function() {
callFullImage(this._name);
clearTimeout(srch1TO);
srch1TO=setTimeout(srch1F,6000);
}
function srch1F(){
}
}
}
}
function callFullImage(myNumber) {
fullImg_mc.heading.text = "";
fullImg_mc.caption.text = "";
percentClip.percentDisplay.text = "";
percentClip._visible =true;
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.heading;
myCaption = myImages[myNumber].attributes.title;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
fullImg_mc.heading.selectable = false;
fullImg_mc.caption.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
bar._width = (loadedBytes/totalBytes)*310;
percentClip._x = bar._x + bar._width;
var percentage:Number = Math.round((loadedBytes/totalBytes)*100);
bar._xscale = percentage;
percentClip.percentDisplay.text = percentage + "%";
if (loadedBytes >= totalBytes) {
percentClip._visible = false;
}
};
fullClipLoader.loadClip("http://www.myweb.org/photos/"+myURL,fullImg_mc.fullImage_mc);
}