class Main{
private var profiler: Object;
public var myApplication: Application;
...
public function Main(tgtParam: MovieClip){
profiler = tgtParam.profiler; //profiler is defined in master swf
tgtParam.main = this; //put pointer to this on _root
}
public function startApplication(){
myApplication = new Application();
profiler.profile("_root.main.myApplication.someMethodToProfile");
profiler.profile("_root.main.myApplication.someOtherMethodToProfile");
profiler.begin("profile");
}
public function endApplicaiton(){
profiler.end();
trace(profiler.getFlatGraph());
}
On 5/23/06, Chris Bare <[EMAIL PROTECTED]> wrote:
> I've been using ASProf with MTASC and AS2 Projects. It seems to work okay.
>
> If you're using the code code injection technique, just include ASProf in
> your master FLA, and then pass a reference to it to your main class.
>
> -Adam
I just started looking at ASProf, so I'm not sure I'm following. Are you
saying to pass ASProf as a parameter to your main class when you instantiate
your main class?
Then how do you register the objects to profile? I tried several different
syntaxes, but couldn't get it to profile my objects.
--
Chris Bare
[EMAIL PROTECTED]
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
