# MC's holding custom variables

**URL:** https://forum.kirupa.com/t/mcs-holding-custom-variables/310907
**Category:** flash
**Created:** [June 22, 2010, 6:18pm UTC](https://forum.kirupa.com/t/mcs-holding-custom-variables/310907 "2010-06-22T18:18:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Cablestein](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@Cablestein](https://forum.kirupa.com/u/Cablestein)
#### Post date: [June 22, 2010, 6:18pm UTC](https://forum.kirupa.com/t/mcs-holding-custom-variables/310907/1 "2010-06-22T18:18:26Z")

</div>

Hi

Having a bunch of dynamically-created MC’s, what is the best way to store custom variables for each MC?

Do I just make a hidden textfield inside each MC to hold the data?

For example I have MC’s called:  
-Apple1  
-Apple2  
-Apple3  
-etc…

And inside each MC I have a variable appleEaten = X.

And eventually I could use the data in an IF statement like:  
if appleY.appleEaten == X then do something.

What is the best method, or generally common way of doing this? Maybe I’m already doing it, I don’t know.
