3 Replies Latest reply on Sep 13, 2007 8:35 AM by kglad

    changing a variable from MovieClip to String

    michaeltowse Level 1
      I have assigned a MovieClip as a variable so I can use the _x and _y properties

      var correctAnswer:MovieClip = radio4;

      but I also want to use the name of the instance in the following if/else statement

      if (this._parent.radioGroup.selectedData == correctAnswer){
      //do something

      The problem comes from the correctAnswer being _level0.radio4 when all I need is Radio4.

      Any clues on what a solution might be. I know my details are sketchy at best (I blame copious amounts of caffiene!).

      Mike