# How to get just part of a variable

**URL:** <https://forum.kirupa.com/t/how-to-get-just-part-of-a-variable/224599>\
**Category:** flash\
**Created:** [May 3, 2007, 4:02pm UTC](https://forum.kirupa.com/t/how-to-get-just-part-of-a-variable/224599 "2007-05-03T16:02:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurrle](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@kurrle](https://forum.kirupa.com/u/kurrle)\
**Post date:** [May 3, 2007, 4:02pm UTC](https://forum.kirupa.com/t/how-to-get-just-part-of-a-variable/224599/1 "2007-05-03T16:02:24Z")

</div>

I have a movie that is passing the name of a movie clip to the \_root. The problem is I can only get it to pass the entire name including the path by using this:

blueButton.onRelease = function() {  
trace(this.\_parent);  
}

**it returns this:**

\_level0.scrollPane.spContentHolder.blue1

\*\*I would like to have it return this: \*\*  
blue1 or even just 1

How can I do this?
