# \[Flash8 AS2\] Variables and Multiple MC's

**URL:** <https://forum.kirupa.com/t/flash8-as2-variables-and-multiple-mcs/242902>\
**Category:** flash\
**Created:** [October 31, 2007, 3:26pm UTC](https://forum.kirupa.com/t/flash8-as2-variables-and-multiple-mcs/242902 "2007-10-31T15:26:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![R1S1N](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@R1S1N](https://forum.kirupa.com/u/R1S1N)\
**Post date:** [October 31, 2007, 3:26pm UTC](https://forum.kirupa.com/t/flash8-as2-variables-and-multiple-mcs/242902/1 "2007-10-31T15:26:37Z")

</div>

Hi Guys,

I am writing a simple game in which the hero will need to jump on a trampoline.

the thing is there are various trampolines (set as instance name tramp1, tramp2, tramp3 etc, and only one trampoline will be active at any given time.

i have set a variable \_global.level which decides which trampoline is active  
but how do i do the hit test?

so far i have:

trampland = \_parent.ground.tramp2._spring_.hitTest(this.\_x+8, this.\_y+32, true);

if (trampland) {go and do something}

but how do i tell which ‘tramp’ to use?

have been trying \_parent.ground.tramp[\_global.level].spring, but to no avail

can anybody help please…

Richard

p.s.\* (spring\* is the ‘trampoline bed’ that activates the bounce)
