[Webpro] xml jpeg

Valentijn Langendorff val at multimediaconsult.nl
Mon Aug 8 14:46:45 EDT 2005



Hi ,

I got this problem that auotmatically loaded thumbnails for my
slideshows loading from my
xml files...
When loading the thumbnails they will placed at a fixed heigth [260
for y] and
the x positions depends on the pictures width but it doesn't get
placed correctly.
I want them to be placed at a fixed relative space between the
seperate thumbnails..
from thumnail 1-2 > 2>3 etc BUt some howe it grabbes the x(0.,0) top
from evey picture instead
of XtopRight + width etc

Any ideas ??? Look at the function makeButtons()

Valentijn

function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
var thb = th_nav.thmb.duplicateMovieClip("thmb"+i, 1000+i);
thb.id = i;

//nu x en y verwisseld
//thb._y = i%1*50; // modulo 2, rij van 2,

thb._y = -260; // zet buttons op vaste
hoogte
thb._x = 20+ i%curLength*80; // zet 90 pixels vanaf
topleft van vorige plaatje

//if (i==0){ //voorwaarde bij startwaarde 0,
eerste plaatsen op ca 40 van linkerrand
//thb._x = 30;

//} else {
//mclipnrvorig = "thmb"+(i-1);
//var xvoorganger = mclipnrvorig._x;
//thb._x = 30+ mclipnrvorig + i%curLength*60;
//}

}
loadButtons();
}
function loadButtons() {
var tbox = th_nav["thmb"+tnNr].box;
tbox.loadMovie(tArray[tnNr]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
if (bt == bl && bt>4) {
nextButton();
delete this.onEnterFrame;
}
};
}





More information about the Webpro mailing list