# Variables with function

**URL:** https://forum.kirupa.com/t/variables-with-function/71362
**Category:** flash
**Created:** [November 23, 2004, 11:14pm UTC](https://forum.kirupa.com/t/variables-with-function/71362 "2004-11-23T23:14:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Adam1](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Adam1](https://forum.kirupa.com/u/Adam1)
#### Post date: [November 23, 2004, 11:14pm UTC](https://forum.kirupa.com/t/variables-with-function/71362/1 "2004-11-23T23:14:52Z")

</div>

Ok, I have some code that makes a variable based on an MC’s name:

menuToOpen=this+“menu”

which translates into \_level0.but1menu

then I try to call a function with this:

menuToOpen.easeY(100)

but it doesn’t work, yet it traces “\_level0.but1menu”, and trying the function as this:

\_level0.but1menu.easeY(100) does work. Any idea why?

I’ve also attached a mock up if you want to see what I mean.

Thanks for any and al input, this one seems weird to me - but I’m sure there is a completely logical explanation. I’ve used the same sort of idea to open external swfs with no issue.

Thanks everyone,  
Adam

///edit, nm, I got it 😉
