All pastes #426649 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-06 09:23 UTC
rendered paste body
var imageFunction = function (request, xml){
		img = $('largeimg');
		img.effects({duration: 1000}).start({'opacity':[1,0]});
		
		var response = xml.documentElement;
		var src = response.getElementsByTagName("imagepath")[0].firstChild.nodeValue;
		var caption = response.getElementsByTagName("imagecaption")[0].firstChild.nodeValue;
		
		var asset;
		
		new Asset.image(src, {onload: function() {
			img.effect({duration: 1000}).start(0).chain(function() {
				img.setProperty('src', src);
				$('caption').setHTML(caption);
				img.effect({duration: 1000}).start(1);
			}
			
		}
	}