I would like to access an ActionScript 3.0 top level function from a class of mine, in which a symbol with the same name (trace
) as the top level function is already defined:
class A {
public static function trace():void {
}
trace("Test");
}
I would like to call the global ActionScript trace
function with trace("Test")
, but this is not possible as another symbol function trace()
is defined.
In a case where the external definition which I would like to access would be located in a package (flash.utils
or so), I could access that external definition with flash.utils.[definitionName]
, as I do here with ByteArray:
import flash.utils.*;
class ByteArray {
var data:flash.utils.ByteArray;
}
Is there a similar syntactical expression in ActionScript 3.0 that would allow me to access the trace function in the first example without changing the name of my class method trace
?
This is a hypothetical question, please do not consider workarounds. I need to solve the problem exactly as asked above. Thanks in advance!