Paul, have you worked out a method for looping thru an array of images previews within a dialog? I must have spent a whole day the other week trying this… All I was trying was to have two buttons 'previous' & 'next'… But I'll be shot if I could work this out this ScriptUI stuff is still very new to me… I can remove an image from its parent window container but can I put a replacement back… nope… 
Yes here is an example, BUT it will not work with Photoshop CS5 (Yet another bug!) works with Photoshop CS3 and CS4
It will work with Bridge and Illustrator CS5 though.
function main(){
inputFolder = Folder.selectDialog("Please select the folder with Files to process");
var fileList = inputFolder.getFiles(/\.(jpg|png)$/i);
Image.prototype.onDraw = function(){ // written by Marc Autret
// "this" is the container; "this.image" is the graphic
if( !this.image ) return;
var WH = this.size,
wh = this.image.size,
k = Math.min(WH[0]/wh[0], WH[1]/wh[1]),xy;
// Resize proportionally:
wh = [k*wh[0],k*wh[1]];
// Center:
xy = [ (WH[0]-wh[0])/2, (WH[1]-wh[1])/2 ];
this.graphics.drawImage(this.image,xy[0],xy[1],wh[0],wh[1]);
WH = wh = xy = null;
}
var win = new Window ("dialog", "Image test");
win.pnl1 = win.add('panel', undefined, undefined, {borderStyle:'black'});
win.pnl1.preferredSize=[200,200];
win.Im1 = win.pnl1.add ("image", undefined,fileList[0]);
win.Im1.size = [180,180];
win.pnl2 = win.add('panel', undefined, undefined, {borderStyle:'black'});
win.pnl2.bu1 = win.pnl2.add('button',undefined,'Next');
win.pnl2.bu2 = win.pnl2.add('button',undefined,'Previous');
win.grp100 = win.add('group');
win.grp100.bu1 = win.grp100.add('button',undefined,'Cancel');
var PIC = 0;
win.pnl2.bu1.onClick=function(){
//Next picture
if(PIC == fileList.length -1) return;
PIC++;
win.Im1.image = fileList[PIC];
}
win.pnl2.bu2.onClick=function(){
//Previous
if(PIC == 0 ) return;
PIC--;
win.Im1.image = fileList[PIC];
}
win.show();
}
main();