# How to use 'trace'

**URL:** <https://forum.kirupa.com/t/how-to-use-trace/9670>\
**Category:** Uncategorized\
**Created:** [December 16, 2002, 10:27am UTC](https://forum.kirupa.com/t/how-to-use-trace/9670 "2002-12-16T10:27:33Z")\
**Posts on this page:** 4\
**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:** [December 16, 2002, 10:27am UTC](https://forum.kirupa.com/t/how-to-use-trace/9670/1 "2002-12-16T10:27:33Z")

</div>

i heard that you can check your codes by using the ‘trace’ code thing but how do you use it?  
i checked the actionscript dictionary but it was very confusing so can someone plz help me explain it simply…? 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:** [December 16, 2002, 11:44am UTC](https://forum.kirupa.com/t/how-to-use-trace/9670/2 "2002-12-16T11:44:35Z")

</div>

trace commands are most for debug use, let´s say that you have a movie that is not working properly and you want to check if you´re passing/retrieving the **ballSpeed** variable right, so, you add this command:

```php
trace ("speed of the ball= " ballSpeed);

```

[SIZE=1]the text between “” will be set to a static text string, and the **ballSpeed** will return the the value of that variable[/SIZE]

them you test your movie in flash. The output window will return:

**speed of the ball = [COLOR=red]value[/COLOR]**

you compare the value, if it is what you´re expecting so you´re passing/retrieving that variable correctly, if not…

=)

---

<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:** [December 16, 2002, 12:13pm UTC](https://forum.kirupa.com/t/how-to-use-trace/9670/3 "2002-12-16T12:13:33Z")

</div>

```php
trace ("speed of the ball= " + ballSpeed);

```

You have to concatenate the strings you put in the trace with the ‘+’ operator.

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:** [December 16, 2002, 12:21pm UTC](https://forum.kirupa.com/t/how-to-use-trace/9670/4 "2002-12-16T12:21:17Z")

</div>

yeah I forgot the **+** signal.☹

Thanks Ilyas!🙂
