FLASH AS2 dynamically added button
<pre><code>_root.attachMovie("zoom_btn", "zoom_btn", _root.getNextHighestDepth());

zoom_btn.onRelease = function() {
    _root.attachMovie("blank_btn", "blank_btn", _root.getNextHighestDepth());
    blank_btn._x=200;
}

//zoom_btn.onRelease();

blank_btn.onRelease = function() {
    trace ("click");
}
</code></pre>

<p>After clicking on "zoom_btn", "blank_btn" adding on stage from library (export for AS is ON).</p>

<p>When i click on "blank_btn", nothing happens. Trace not working.</p>

<p>What am I doing wrong?</p>

<p>UPD: If i uncomment line 8, all works fine.</p>