# Scoping problelm using slice concatenation?

**URL:** <https://forum.kirupa.com/t/scoping-problelm-using-slice-concatenation/320292>\
**Category:** flash\
**Created:** [March 19, 2011, 1:49pm UTC](https://forum.kirupa.com/t/scoping-problelm-using-slice-concatenation/320292 "2011-03-19T13:49:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdawg](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@kdawg](https://forum.kirupa.com/u/kdawg)\
**Post date:** [March 19, 2011, 1:49pm UTC](https://forum.kirupa.com/t/scoping-problelm-using-slice-concatenation/320292/1 "2011-03-19T13:49:51Z")

</div>

When I trace the variable it comes out fine. But when I try to toggle the visibility with it, it doesn’t work. I can toggle visibility when I manually type the path name. What am I missing? Checked for possible spaces too. Stumped!

```auto
    
tempHolder.onRelease = function() {
        arrowName = "arrow"+this._name.slice(5);
        arrowName._visible = true; //<-- This doesn't work
        trace(arrowName); //<-- The trace says arrow1
        // arrow1._visible=true; <-- This works
        trace("*"+arrowName+"*"); //<-- This says *arrow1* no spaces
}

```
