All pastes #290890 Raw Edit

Something

public text v1 · immutable
#290890 ·published 2006-12-24 14:08 UTC
rendered paste body
Stage.scaleMode = "noScale";
// nicht skalieren
Stage.align = "tl";
// Bühne ausrichten obenlinks
zwischenraum = 5;
bilder = 15;
//imgPerRow =Stage.width/(Stage.width/this.mc._width*zwischenraum+Stage.width/this.mc._width)
for (var i = 0; i<bilder; i++) {
	this.mc.inmc.duplicateMovieClip("newMC"+i, i+30);
	this.mc["newMC"+i].mytext.text = i;
	this.mc["newMC"+i]._y = 100;
}
function checkStangeSize() {
	this.createEmptyMovieClip("stangeSizeChecker", 454);
	this.stangeSizeChecker.onEnterFrame = function() {
		if (this._parent.stageSize_x !== Stage.width) {
			//berechnet wieviele bilder + zwischenraum in eine reihe passen
			trace(this._parent.imgPerRow=Stage.width/(Stage.width/this._parent.mc.inmc._width*zwischenraum+Stage.width/this._parent.mc.inmc._width));
			xpos = ypos=0;
			for (var i = 0; i<_root.bilder; i++) {
				if (xpos == this._parent.imgPerRow) {
					ypos++;
					xpos = 0;
				}
				this._parent.mc["newMC"+i]._x = (this._parent.mc.inmc._width+zwischenraum)*xpos;
				this._parent.mc["newMC"+i]._y = (this._parent.mc["newMC"+i]._height+zwischenraum)*ypos+120;
				xpos++;
			}
			this._parent.mc._x = Stage.width/2-(this._parent.mc._width/2)+this._parent.mc.inmc._width/2;
			this._parent.stageSize_x = Stage.width;
		}
	};
}
checkStangeSize();