# Hide/show MCs

**URL:** https://forum.kirupa.com/t/hide-show-mcs/195387
**Category:** flash
**Created:** [July 31, 2006, 11:20am UTC](https://forum.kirupa.com/t/hide-show-mcs/195387 "2006-07-31T11:20:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![freddiemiles](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@freddiemiles](https://forum.kirupa.com/u/freddiemiles)
#### Post date: [July 31, 2006, 11:20am UTC](https://forum.kirupa.com/t/hide-show-mcs/195387/1 "2006-07-31T11:20:38Z")

</div>

Got a list of MCs being populated from an XML file. Basically a list of two different types of information. Some are type A, some are type B.

Want to have a couple buttons that filter based on type (so if I push the button for type A (called “typeAbtn” below), only those MCs appear and type B MCs go to \_alpha = 0 or something).

Can’t seem to come up with a function to do it. I can’t figure out how to reference all my MCs from outside the first function correctly.

terrible attempt:

```auto

function showMCs() {
for (var j = 0; j<stuff.length; j++) {
    MC = timeline_mc["MC"+j];
    MC.type = xml.blahblah.attribute.type;
...

typeAbtn.onPress = function() {
if ( MC.type == "B" ) {
    MC[?].alpha = 0;
}
}

```
