Ich habe schon wieder ein Problem. Ich habe eine for Schleife und würde gern die Nummer in einer Variable speichern. Ich habe so etwas schonmal gemacht und damals funktionierte es aber nun geht es nicht. Ich habe mal einen Ausschnitt aus dem Code anbeigefügt.
PHP-Code:
for(i = 0; i < gal_count; i++) {
this.thumbs_mc.inhalt_mc.attachMovie("Thumb", "thumb" + i, this.thumbs_mc.inhalt_mc.getNextHighestDepth());
thumb_mc = this.thumbs_mc.inhalt_mc["thumb" + i];
thumb_mc._y = ypos;
ypos += 60;
thumb_mc.num = i;
thumb_mc.onRelease = function() {
var pressypos = (this._y *-1);
picload(thumb_mc.num);
thumbs_mc.inhalt_mc.onEnterFrame = function() {
this._y += (pressypos - this._y) / 2
}
}
}
mit thumb_mc.num = i; möcht ich also die Nummer sichern. Allerdings scheint er trotz alledem die Variable immer wieder zu überschreiben. Wenn ich sie nachher bei onRelease verwenden möchte habe ich die Zahl des letzten Durchlaufs darin egal auf welches Bild ich klick.