# Trace()

**URL:** https://forum.kirupa.com/t/trace/2501
**Category:** Uncategorized
**Created:** [March 24, 2002, 9:37am UTC](https://forum.kirupa.com/t/trace/2501 "2002-03-24T09:37:22Z")
**Posts on this page:** 19
**Page:** 1

<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: [March 24, 2002, 9:37am UTC](https://forum.kirupa.com/t/trace/2501/1 "2002-03-24T09:37:22Z")

</div>

hi  
In my main time line i’ve 2 frames: one with a textbox as input text called “escrevaAqui” and a script frame with the following code:  
“var escrevaAqui;”. Both are on frame 1.  
When i preview the movie and write something in this box, nothing appears in the output window.  
What am i doing wrong?

---

<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: [March 24, 2002, 10:37am UTC](https://forum.kirupa.com/t/trace/2501/2 "2002-03-24T10:37:12Z")

</div>

I don’t understand why you have 2 frames for.

pom 0]

---

<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: [March 24, 2002, 10:42am UTC](https://forum.kirupa.com/t/trace/2501/3 "2002-03-24T10:42:33Z")

</div>

just a matter of organization: one for graphics and so on and another just for code…

---

<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: [March 24, 2002, 10:43am UTC](https://forum.kirupa.com/t/trace/2501/4 "2002-03-24T10:43:52Z")

</div>

OK, you have 2 layers then… Did you trace the variable ? trace (writehere) if that’s what it means ?

pom 0]

---

<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: [March 24, 2002, 10:55am UTC](https://forum.kirupa.com/t/trace/2501/5 "2002-03-24T10:55:11Z")

</div>

🙂  
sorry  
yes, 2 layers, not frames; and an input box named: “nome”  
i wrote:  
var nome;  
trace(nome);

now, the output window doesnt write what i wrote in the input box!

---

<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: [March 24, 2002, 10:59am UTC](https://forum.kirupa.com/t/trace/2501/6 "2002-03-24T10:59:33Z")

</div>

Might be a lot of things. Send me the fla : [ilyas.usal@club-internet.fr](mailto:ilyas.usal@club-internet.fr)

pom 0]

---

<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: [March 24, 2002, 11:10am UTC](https://forum.kirupa.com/t/trace/2501/7 "2002-03-24T11:10:38Z")

</div>

I know what’s wrong. The movie’s not looping. Put your code inside a movie clip, with a onClipEvent (enterFrame handler. And loose the variable declaration, it’s of no use.

pom 0]

---

<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: [March 24, 2002, 1:06pm UTC](https://forum.kirupa.com/t/trace/2501/8 "2002-03-24T13:06:03Z")

</div>

“Well, with your code, the code is executed only once, at the beginning  
of the movie. In order to make a loop, you have to set up a movie clip  
that will execute the code on each new frame, which translates into  
Flash to onClipEvent (enterFrame).  
That’s all !”  
So what’s wrong with my code? i’d prefer it written only once, without mcs. Can it be made?  
I know, because i made it, the trace appear if i put a button that has a code to write the value of the “nome” variable in an dynamic text box…

---

<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: [March 24, 2002, 2:12pm UTC](https://forum.kirupa.com/t/trace/2501/9 "2002-03-24T14:12:29Z")

</div>

Of course it’s possible, but you need a LOOP !!  
I’ll send it to you.

pom 0]

---

<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: [March 24, 2002, 3:25pm UTC](https://forum.kirupa.com/t/trace/2501/10 "2002-03-24T15:25:57Z")

</div>

thanks again  
so…no loop no trace()?

---

<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: [March 24, 2002, 4:23pm UTC](https://forum.kirupa.com/t/trace/2501/11 "2002-03-24T16:23:45Z")

</div>

You can trace without a loop, but with a loop, you can check the evolution of the data. Without you can’t.

pom 0]

---

<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: [March 24, 2002, 4:46pm UTC](https://forum.kirupa.com/t/trace/2501/12 "2002-03-24T16:46:45Z")

</div>

may i see a code example of trace() without loop?

---

<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: [March 24, 2002, 4:51pm UTC](https://forum.kirupa.com/t/trace/2501/13 "2002-03-24T16:51:01Z")

</div>

Just put trace (yourvariable) somewhere in your animation !! For instance, it can be used to check if a movie or data has been correctly loaded, or when you duplicate a clip, to check that the movies actually duplicated… All kinds of stuff. It depends onwhat you’re doing.

pom 0]

---

<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: [March 24, 2002, 5:17pm UTC](https://forum.kirupa.com/t/trace/2501/14 "2002-03-24T17:17:36Z")

</div>

i feel dumb…  
imagine i’ve just one layer with some text in it and an input box  
what i want is to trace() whatever is written into that box…and without a loop  
is it possible? How?

---

<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: [March 24, 2002, 5:19pm UTC](https://forum.kirupa.com/t/trace/2501/15 "2002-03-24T17:19:33Z")

</div>

> imagine i’ve just one layer with some text in it and an input box  
> I don’t understand what that means. What do you want to trace it for anyway ?? You can’t use that…

pom 0]

---

<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: [March 24, 2002, 5:28pm UTC](https://forum.kirupa.com/t/trace/2501/16 "2002-03-24T17:28:14Z")

</div>

imagine its where a user inputs her name  
what i want is to trace() … her name  
cant i?

---

<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: [March 24, 2002, 5:45pm UTC](https://forum.kirupa.com/t/trace/2501/17 "2002-03-24T17:45:17Z")

</div>

Well, you could put your textbox, plus a button with the code

```auto
 on (press) {trace (_root.text)}

```

I still don’t understand why you want to trace. Do you know that tracing doesn’t appear in the final animation ?

pom 0]

---

<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: [March 24, 2002, 6:09pm UTC](https://forum.kirupa.com/t/trace/2501/18 "2002-03-24T18:09:44Z")

</div>

yes…🙂  
i’m reading actionscript the definitive guide and the author uses the trace; as i’m beguinning at it, i’d like to use it in this example of mine.  
just that.  
but i guess i cant do it like i thought…i thought i could use it whenever i wanted to know (trace) something, without further complications

---

<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: [March 24, 2002, 6:19pm UTC](https://forum.kirupa.com/t/trace/2501/19 "2002-03-24T18:19:24Z")

</div>

Well, you can, but the data has to exist when you trace, and you have to find the right path to get to the data.

pom 0]
