2 Replies Latest reply on Mar 23, 2016 11:01 AM by tommyhbrandt

    Variable as MovieClip name


      I have a single scene with MovieClips serving as sub-scenes. Inside the SubScene, I have a MovieClip that holds the Menu "buttons"(MovieClips acting as buttons).


      From the Menu buttons, I am trying to access frame Labels inside "Slides" that live at the same level as the Menu MovieClip. So Menu and Slide 1,2,3 are all siblings.


      I am setting the "currentSlide" at the Menu level when a button is clicked that I would like to pass to the path of the slide label.


      I can get things working by hard coding a name, but I cannot figure out how to pass the stored variable.

      For ease, the value of the currentSlide var is a string containing the exact name of the Slide.


      Here is the working code:



      I need:

          MovieClip(this.parent.getChildByName(VARIABLE VALUE)).gotoAndPlay("slide_out");


      How can I pass the variable here?



      Thanks in advance.