# Parts of Variables

**URL:** <https://forum.kirupa.com/t/parts-of-variables/7472>\
**Category:** flash\
**Created:** [October 31, 2002, 7:56pm UTC](https://forum.kirupa.com/t/parts-of-variables/7472 "2002-10-31T19:56:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sorcerer](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Sorcerer](https://forum.kirupa.com/u/Sorcerer)\
**Post date:** [October 31, 2002, 7:56pm UTC](https://forum.kirupa.com/t/parts-of-variables/7472/1 "2002-10-31T19:56:45Z")

</div>

After creating my collapsable menu I decided I wanted to try to make one that was dynamic. So far this board has been a ton of help, for all of you that have answered my questions of gave me tips, thanks a lot.

Now on to my next question, is it possible to extract only part of a variable. When a button is clicked I assign “this.\_parent.\_name” to a variable which will return something along the lines of BtnGroup1 or BtnGroup2 … etc.  
I’m wondering if it’s possible to Drop the “BtnGroup” part and somehow return just the number. I have the number of subButtons stored in an array need some way to pull the number of sub buttons for the main button that was clicked. Any help, ideas, or suggestions is greatly appreciated.

---

<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:** [October 31, 2002, 9:37pm UTC](https://forum.kirupa.com/t/parts-of-variables/7472/2 "2002-10-31T21:37:50Z")

</div>

Check the strings methods. I don’t know them by heart, but you’ll find everything there (in the AS dictionary, I mean). And if you don’t, well, just post back 🙂

---

<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:** [October 31, 2002, 10:54pm UTC](https://forum.kirupa.com/t/parts-of-variables/7472/3 "2002-10-31T22:54:03Z")

</div>

got it to work, thanks
