| Jean Philippe 2004-04-27, 5:34 pm |
| Hi, when I'm calling this script for the time it works perfect but the
2th time I get an error message.
So if someone could have an idea, it will help me a lot. :-)
Movieclip.prototype.oldLoadMovie=Movieclip.prototype.loadMovie
Movieclip.prototype.loadMovie=function(url,vars){
if(this.onData != undefined && this.onData != null){
this._parent.createEmptyMovieClip("__fixEvents",7777)
this._parent.__fixEvents.theTarget=this
this._parent.__fixEvents.onData=this.onData
if(this.onLoad != undefined && this.onLoad != null){
this._parent.__fixEvents.onLoad=this.onLoad
}
this._parent.__fixEvents.onEnterFrame=function(){
this.oldv=this.v
this.v=this.theTarget.getBytesLoaded()
if(this.v != this.oldv){
this.onData.call(this.theTarget)
}
if(this.v == this.theTarget.getBytesTotal() &&
(this.theTarget._width > 0) && (this.theTarget._height > 0)){
_root.theTarget.onData=_root.onData
if(this.onLoad != undefined){
this.theTarget.onLoad=this.onLoad
}
this.onLoad.call(this.theTarget)
this.removeMovieClip()
}
}
}
this.oldLoadMovie(url,vars)
}
|