# \[AS2\] Trace not working

**URL:** https://forum.kirupa.com/t/as2-trace-not-working/280827
**Category:** programming
**Created:** [February 1, 2009, 9:35pm UTC](https://forum.kirupa.com/t/as2-trace-not-working/280827 "2009-02-01T21:35:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![John\_Barbarossa](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@John\_Barbarossa](https://forum.kirupa.com/u/John_Barbarossa)
#### Post date: [February 1, 2009, 9:35pm UTC](https://forum.kirupa.com/t/as2-trace-not-working/280827/1 "2009-02-01T21:35:51Z")

</div>

Hello. I have a trace pointed at a button that is inside a movieclip. So far targeting the button seems to be working, and the hit states and rollover effects all seem to be fine.

However, for some reason the trace I have put on release doesn’t seem to be working. I’ve attached the .fla, but heres a sample of the code, in case it’s something obvious. If anyone could take a look at this, I’d be very grateful. Its had me stumped for two days now (n00b alert).

First the code for attaching the mc that contains the button.

```php

var newBtn = attachMovie("MP_v2RocketComponent", "MP_v2RocketComponent", _root.getNextHighestDepth());
newBtn._x = 370;
newBtn._y = 515;

```

Then I try to target the button inside it

```php

MP_v2RocketComponent.v2RocketSectionBtn.onRelease = function()
    {
         trace("clicked on MP_v2RocketComponent");
    }

```

Like I say, the button seems to be working, but won’t seem to trace.

Thanks for taking a look.
