Flash Variable to play MovieClip

Hi guys,

I am trying to get flash to play a MC based on a variable that is passed through…

I have a switch statement which i think would be best to use however this does not work… so I guess it’s not… but you should be able to see what i’m trying to do with the code below.

I’m not sure if I need to have anything above this switch code to call the variable being passed through?


switch (page) {
 case 'index': 
  _root.mc_home.gotoAndPlay(2);
 case 'scout':
  _root.mc_scout.gotoAndPlay(2);
 case 'coaching':
  _root.mc_coaching.gotoAndPlay(2);
 case 'corner':
  _root.mc_corner.gotoAndPlay(2);
 case 'camps':
  _root.mc_camps.gotoAndPlay(2);
 default:
  _root.mc_home.gotoAndPlay(2);
 }

Any ideas… thanks heaps for any help.