AS3 Question:

Is there a way to give all classes in every package a couple of new methods?

I want to create a couple of new custom trace methods and have them available 
for every class within the type heirachy.

Currently, I've extended the Sprite type to include these trace methods and 
most of my classes then extend this new Sprite type (which I've called 
SpriteX). Therefore the new functions are accessed as such:

tracer("trace my string biatch", 0);

However, I've also extended the Event class with a new Event type, but can only 
access these new trace methods via a direct reference to the public static 
functions within the new Sprite type. i.e:

SpriteX.tracer("trace my string biatch", 0);

I want all types to be able to call the method directly as an internal function.

So I could possibly hack the native flash Object type, is this the best way to 
do this?

Cheers,
Stephen.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to