MovieClip.prototype.playMC = function( stopAtFrame:Number, inProcess:Boolean, frames:Number ) { if (inProcess != false) { global.ready = false; } if (frames == undefined) { frames = 1; } if (stopAtFrame == null) { stopAtFrame = this._totalframes; } this.onEnterFrame = function() { this.fc = frames; while (this.fc-- > 0) { if ( this._currentframe < stopAtFrame) { this.nextFrame(); } else { this.fc = 0; delete this.onEnterFrame; if (inProcess != false) { global.ready = true; } } } } } MovieClip.prototype.playReverseMC = function( stopAtFrame:Number, inProcess:Boolean, frames:Number ) { if (inProcess != false) { global.ready = false; } if (frames == undefined) { frames = 1; } if (stopAtFrame == null) { stopAtFrame = 1; } this.onEnterFrame = function() { this.fc = frames; while (this.fc-- > 0) { if ( this._currentframe > stopAtFrame ) { this.prevFrame(); } else { this.fc = 0; delete this.onEnterFrame; if (inProcess != false) { global.ready = true; } } } } } MovieClip.prototype.playMC_fromTo = function( beginAtFrame, stopAtFrame, frames:Number, inProcess:Boolean ) { // beginAtFrame, stopAtFrame: Number oder Frame-Label // falls Label: var "label=..." muss in begin/stop-Frame gesetzt sein // frames funktioniert nur mit framenumber (nicht label) if (inProcess != false) { global.ready = false; } if (frames == undefined) { frames = 1; } if (beginAtFrame != null) { this.gotoAndStop(beginAtFrame); } if (stopAtFrame == null || stopAtFrame > this._totalframes) { stopAtFrame = this._totalframes; } this.onEnterFrame = function() { this.fc = frames; while (this.fc-- > 0) { if ( (new Number(stopAtFrame) == stopAtFrame && this._currentframe < stopAtFrame) || (new Number(stopAtFrame) != stopAtFrame && this.label != stopAtFrame) ) { this.nextFrame(); } else { this.fc = 0; this.stop(); delete this.onEnterFrame; if (inProcess != false) { global.ready = true; } } } } } MovieClip.prototype.playReverseMC_fromTo = function( beginAtFrame, stopAtFrame, frames:Number, inProcess:Boolean ) { if (inProcess != false) { global.ready = false; } if (frames == undefined) { frames = 1; } if (beginAtFrame != null) { this.gotoAndStop(beginAtFrame); } if (stopAtFrame == null) { stopAtFrame = 1; } this.onEnterFrame = function() { this.fc = frames; while (this.fc-- > 0) { if ( (new Number(stopAtFrame) == stopAtFrame && this._currentframe > stopAtFrame) || // number (new Number(stopAtFrame) != stopAtFrame && this.label != stopAtFrame) ) { this.prevFrame(); } else { this.fc = 0; this.stop(); delete this.onEnterFrame; if (inProcess != false) { global.ready = true; } } } } } ASSetPropFlags(MovieClip.prototype, ["playMC", "playReverseMC", "playMC_fromTo", "playReverseMC_fromTo"], 7, 0);