1 Reply Latest reply on Jan 27, 2009 7:03 AM by kglad

    If statements

      Hey, I'm pretty new to flash; I can do buttons and VERY basic action script. But for a project at college we need to create a game and have if statements.
      I have chosen a kind of pair’s game, where an animal noise is played (called sound_1 sound_2 ect) and then the child clicks the corresponding animal, and then that animal disappears, if the incorrect animal is chosen I want a message or something to say

      'uhoh try again'

      But I haven’t a clue where to start, any help would be appreciated, but it needs to be simple, and I need to know where to put the code and stuff too =[

      Btw the animals are movie clips and the sound played comes from a button click
        • 1. Re: If statements
          kglad Adobe Community Professional & MVP
          there must be some way to relate the sounds to the animal movieclips. when the sound button is clicked, you can assign a variable's value so you then know which animal movieclip should be clicked. when an animal movieclip is clicked use your if-statement to check if the clicked animal matches the sound played.