onEnterFrame=null, onEnterFrame=undefined & delete onEnterFrame…
Which one to use??? What are the performance considerations. If all my movieclips on-stage are running a MovieClip.prototype.onEnterFrame = function() {run initial stuff before setting onEnterFrame=null/undefined… }, will there be performance hits? It’s sad that delete onEnterFrame doesn’t work unless I delete the prototype enterFrame as well, which would make the clips reinitailise itself again once you declare the enterFrame prototype again (i need to do this since there’s more movieclips that end up appearing on-stage, and they need to automatically initialises themselves the moment they appear).
It seems that setting enterFrame to null or undefined is the safest way to go about it, since dealing with multiple .swfs would mean using the same MovieClip.prototype, which means I can’t afford to flush out one zone of enterFrames (by deleting both null enterframes and MovieClip.prototype.onEnterFrame) if it means the other zones still needs to initialise their clips first…it’s just too troublesome and buggy a mechanism to implement! Once MovieClip.prototype.onEnterframe is declared, it should stay. Will there be performance hits as a result of this?
Is there anyway to do this without tricking the engine to call the onLoad function for MCs by typing “//” into each movieclip actionscript box — or by troublesomingly creating linkage-ids for every movieclip library item!? NO! That’s not what i want…they’ll only add to the fiile size! How do i execute a certain “constructor/initilisation” function to all Movieclips without linking them to a class in a library? Something to think about…