# Tracing problem

**URL:** https://forum.kirupa.com/t/tracing-problem/17591
**Category:** Uncategorized
**Created:** [April 7, 2003, 10:08am UTC](https://forum.kirupa.com/t/tracing-problem/17591 "2003-04-07T10:08:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)
#### Post date: [April 7, 2003, 10:08am UTC](https://forum.kirupa.com/t/tracing-problem/17591/1 "2003-04-07T10:08:50Z")

</div>

hello,  
well i’m trying to make a dynamic text box show the y value of an object, and the dynamic text box number changes as the object does…and i was thinking the trace function should do it, so heres my code, but it doesn’t seem to work. i’m not sure why, any input would be good thx

[AS]  
blah1.onLoad = function() {  
blah = setInterval(function () {  
trace(\_root.bong.\_y);  
}, 100);  
};  
[/AS]

blah1 is the instance name of the dynamic box which i thougth you would need, and blah is the variable name of the dynamic text box, while bong is the instance name of the object thats moving. thx again

---

<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: [April 7, 2003, 12:11pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/2 "2003-04-07T12:11:00Z")

</div>

Not sure textFields have onLoad handlers defined, and you don’t have to use it anyway.

The thing is, trace outputs something in the output window, not in a textfield, so you don’t need anything, really. Just put somewhere:

```auto
setInterval(function () {
        trace(_root.bong._y);
}, 100);

```

pom 🙂

---

<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: [April 7, 2003, 12:13pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/3 "2003-04-07T12:13:54Z")

</div>

yea that part worked, but the thing was that i want people to see the coordinates the object is on, so i was wondering how it could be done. The only way i could think of was trying to get the trace to show up in a dynamic text box instead :-/

---

<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: [April 7, 2003, 12:23pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/4 "2003-04-07T12:23:30Z")

</div>

```auto
setInterval(function(){blah1.text=bong._y;}, 100);

```

?? =)

---

<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: [April 7, 2003, 12:27pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/5 "2003-04-07T12:27:47Z")

</div>

wow that seemed easy, thx very much 🙂

---

<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: [April 7, 2003, 12:30pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/6 "2003-04-07T12:30:04Z")

</div>

ah yea, i just reliazed what i just copied and pasted dind’t have trace in it. now i understand why it works 🙂

---

<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: [April 7, 2003, 12:48pm UTC](https://forum.kirupa.com/t/tracing-problem/17591/7 "2003-04-07T12:48:06Z")

</div>

no problem 😉 =)
