Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : How can I redefine native functions?


Bart Calixto
4/21/2004 7:46:34 PM
never did it but you should try:
trace.prototype=function() {
}

or something like that

[quoted text, click to view]

stonebrad
4/21/2004 10:38:11 PM
For development reasons I'd like to redefine the native trace() function.
I tried things like:
_global.trace=function(){
//blabla...
}
But it doesn't work...

stonebrad
4/21/2004 11:20:17 PM
trace.prototype = function(str) {
//...
};

doesn't work, but that's because the real syntax is the following:

Class.prototype.trace=function(){
//...
}

Now: What class are we dealing with?

(..)
AddThis Social Bookmark Button