/* André Michelle - http://blog.andre-michelle.com ------------------------------------------------ - Detecting a MovieClip is playing - ------------------------------------------------ thing you need to know: MovieClipInstance._isPlaying returns a Boolean, which shows if the MovieClip is playing for its own or is stopped by a method. To make it clear that a MovieClip method is called, just write this.method() instead of method() Old Flash4 methods are in global use and not affected by a prototype changing. For example: If you want to stop a MovieClip in its timeline, call this.stop(); */ var mp = MovieClip.prototype; //-- property "_isPlaying" mp._isPlaying = true; //-- these methods affect a movieclip playing var _play = mp.play; var _stop = mp.stop; var _gotoAndPlay = mp.gotoAndPlay; var _gotoAndStop = mp.gotoAndStop; var _nextFrame = mp.nextFrame; var _prevFrame = mp.prevFrame; //-- loadMovie causes a movie to play after loading var _loadMovie = mp.loadMovie; MovieClip.prototype.play = function() { this._isPlaying = true; _play.apply( this, arguments ); } MovieClip.prototype.stop = function() { this._isPlaying = false; _stop.apply( this, arguments ); } MovieClip.prototype.gotoAndPlay = function() { this._isPlaying = true; _gotoAndPlay.apply( this, arguments ); } MovieClip.prototype.gotoAndStop = function() { this._isPlaying = false; _gotoAndStop.apply( this, arguments ); } MovieClip.prototype.nextFrame = function() { this._isPlaying = false; _nextFrame.apply( this, arguments ); } MovieClip.prototype.prevFrame = function() { this._isPlaying = false; _prevFrame.apply( this, arguments ); } MovieClip.prototype.loadMovie = function() { this._isPlaying = true; _loadMovie.apply( this, arguments ); } //-- Test Cases onMouseDown = function() { test.gotoAndStop( 1 ); } onEnterFrame = function() { trace( test._isPlaying ); }