I'm afraid you can't extend the trace builtin function . Using another function or logging class and then redirecting the trace to some logger console or even the trace() function, if at some point you need it, is the way to go. MTASC handles that trace replacement through a compiler switch, like a preprocessor macro, making textual substitutions to trace calls in the AS.
The thing is that trace function is not compiled into a call to an actionscript function, but it's embedded directly with its own bytcode in the swf. That's why you can't change its behaviour from AS code. Cheers Juan Pablo Califano 2008/7/15, Adam Jowett <[EMAIL PROTECTED]>: > > Hi all, > > > > A very quick one, I haven't had to over-ride or extend built in classes > since the good old days of prototyping in AS1, specifically this time I > want > to extend the built in trace() statement with some conditions etc. Can this > be done? or do I need to do my own custom logger such as those out there at > the moment? > > > > Cheers > > Adam > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

