# Targeting external swfs with getTimer

**URL:** <https://forum.kirupa.com/t/targeting-external-swfs-with-gettimer/262762>\
**Category:** Uncategorized\
**Created:** [June 9, 2008, 6:17pm UTC](https://forum.kirupa.com/t/targeting-external-swfs-with-gettimer/262762 "2008-06-09T18:17:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zanelyon](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zanelyon](https://forum.kirupa.com/u/zanelyon)\
**Post date:** [June 9, 2008, 6:17pm UTC](https://forum.kirupa.com/t/targeting-external-swfs-with-gettimer/262762/1 "2008-06-09T18:17:10Z")

</div>

Hi there,

I’m currently using getTimer() to test when certain animations and bits of code have been executed. It looks like this:

function update\_timer()  
{  
this.createTextField(“timer\_txt”, this.getNextHighestDepth(), 25, 600, 130, 22);  
var timer\_fmt:TextFormat = new TextFormat();  
timer\_fmt.color = 0xFFFFFF;  
timer\_fmt.size = 14;  
this.timer\_txt.text = "total time: " + getTimer();  
timer\_txt.setTextFormat(timer\_fmt);  
}

It works great, but I’m also using a container.swf file where I load several other swf files externally. I want to keep track of animations and code once those files are loaded, but getTimer always returns the amount of time I’ve had container.swf open (I hope that makes sense), even when I’ve put the function inside the child swf.

Is there any way to specify which swf you want to use getTimer for, or does anyone have any other sly suggestions?

Thanks
