3 Replies Latest reply on Oct 29, 2011 9:28 AM by kglad

    how to trace a random object in an array?

    udikeren Level 1

      i have a simple array:


      animals = ["donkey","elephant","bird",.......];


      and a buttom:


        my_sound = new Sound();

        my_sound.attachSound(_root.animals[random (6)]);



      now i want to check which animal was chosen?


      if( "if for example the sound is donkey"){



      what do i write in the if brackets?