# Trace Function

**URL:** <https://forum.kirupa.com/t/trace-function/65282>\
**Category:** Uncategorized\
**Created:** [September 24, 2004, 4:51pm UTC](https://forum.kirupa.com/t/trace-function/65282 "2004-09-24T16:51:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![todd71](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@todd71](https://forum.kirupa.com/u/todd71)\
**Post date:** [September 24, 2004, 4:51pm UTC](https://forum.kirupa.com/t/trace-function/65282/1 "2004-09-24T16:51:18Z")

</div>

im just curious how the ‘trace’ function works and how i use it in script to find something…im trying to navigate the folders im using…like some of the others here…lol…

the presentation im working on now has a loader.exe that all my external .swfs are loaded into…it goes kind of like…

loader.exe  
-opening.swf  
-home.swf  
–folder  
—folder

ive finally kind of gotten it to navigate with the heirarchy the way it is using /folder/folder/file.swf to get into each file…

but for the sake of convienience when i add this presentation to another its going to be another level down in the heirarchy, so is there a way to use ‘trace’ to make it easier so itll always find the files maybe?

thanks…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 24, 2004, 6:07pm UTC](https://forum.kirupa.com/t/trace-function/65282/2 "2004-09-24T18:07:58Z")

</div>

The trace function is used to output something to the Flash Output window, generally used for debugging, it hasn’t got anything to do with tracing files …

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 24, 2004, 6:08pm UTC](https://forum.kirupa.com/t/trace-function/65282/3 "2004-09-24T18:08:43Z")

</div>

trace() is for debugging purposes only… it returns the value of whatever you are tracing… example…

var i = 8;  
trace(i);

when testing the movie in Flash, the output window will display ‘8’.

It comes in handy when you are trying to do things dynamically through ActionScript and you want to make sure it’s going through properly. And if it isn’t working properly, it helps you pinpoint what section of the code isn’t working.

Since you are using relative targeting, I don’t see how it would pose any problem if you add this presentation to another.

Edit: Oopsies, voets beat me :be:
