für this["scroll_mc"+i]._width bekom ich i*0 raus. Das darf aber nicht sein. ICh vermute, dass der mc nicht schnell genug erstellt, und das Bild hinein geladen wird. Die Breitenabfrage ist einfach zu langsam. Hatte schon ifs und onLoads probiert das funzt aber nicht.
bei this["scroll_mc"+i].onLoad = function(){ ...} zum Beispiel bringt er mir immer nur undefine für this["scroll_mc"+i]._width.. Habt ihr ne Idee, was man da tun kann?
PHP-Code:
x_pos = 50;
max_num = 12
space = 10
function epty_mov(){
createEmptyMovieClip("scroll_mc"+i, i);
thumb = "thumb"+this["i"]+".jpg";
this["scroll_mc"+i].loadMovie(thumb);
}
position = [x_pos];
for (i=0; i<max_num; i++) {
epty_mov()
trace(this["l"+i] = this["scroll_mc"+i]._width)
position.push(this["l"+i]+space);
loes += position[i];
this["scroll_mc"+i]._x = loes;
}