Im trying to find some way (in actionscript 3) to output info for the current package at runtime.
Given the following code snippet;
package com.foo.thing
{
import com.foo.Helper;
public class Tester
{
public function Tester(){
Helper.tracePackage();
}
}
}
I’d want the tracePackage method to trace out the string “com.foo.thing.Tester”. Is there any way to do that?
Cheers,
Greg
Hi you can use the getQualifiedClassName() method to find out the full path of an object, you can then reg ex to just get the package.
Magic!
Hope this helps