# How may I change the variable from var1 to var2 in the parent MC?

**URL:** <https://forum.kirupa.com/t/how-may-i-change-the-variable-from-var1-to-var2-in-the-parent-mc/280951>\
**Category:** flash\
**Created:** [February 3, 2009, 11:08am UTC](https://forum.kirupa.com/t/how-may-i-change-the-variable-from-var1-to-var2-in-the-parent-mc/280951 "2009-02-03T11:08:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IanCremona](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@IanCremona](https://forum.kirupa.com/u/IanCremona)\
**Post date:** [February 3, 2009, 11:08am UTC](https://forum.kirupa.com/t/how-may-i-change-the-variable-from-var1-to-var2-in-the-parent-mc/280951/1 "2009-02-03T11:08:27Z")

</div>

I must admit… I am not programming with classes - mainly because I’ve bought somescripts online and did not manage to modify them into classes since I’m of the victoms of AS3’s learning curve!

I’ve created a tab menu (code is on the main timeline, in a function called xmlLoadedNews) and builds tabs like this :

```auto

xmlListLength = xmlList.length()

for (var i:uint=0; i<xmlListLength; i++) {

        var newsTab = new NewsTab();
        tabHolder.addChild(newsTab);
        newsTab.name = i;

```

Now, I’ve got another script running in a child MC that wants to replace the “xmlList.length()” with the results of playersXML :

```auto

var playersXML = xml..event[evt.target.id].players.player.length();

```

How may I change the variable from xmlListLength to playersXML in the parent MC?
