title: Animating the color of QML rectangles after a button is clicked
body: <p>I am trying to get my board to flash green when a button is clicked.</p>
  
  <p>I have added the following color animation code to help create the flashing effect, so that the board can go from its original colors, to green, and back to it's original colors.</p>
  
  <p>I have seen in some code examples where <code>ColorAnimation</code> can also be used like this <code>ColorAnimation on color{...}</code>. I tried using this to reference the <code>rectangle</code> color property but it complains about <code>color</code> being an invalid property, which is why i don't have it in the code below.</p>
  
  <pre><code>SequentialAnimation
          {
              running: true
              loops: Animation.Infinite
  
              ColorAnimation
              {
                  to: "green"
                  duration: 500
              }
  
              ColorAnimation
              {
                  to: "transparent"
                  duration: 500
              }
          }
  </code></pre>
  
  <p>The code fragment above has gone into the repeater code below. The code below handles displaying my board with the black and white colors I am starting off with.  </p>
  
  <pre><code>Repeater
  {
      id: board
      model: 64
  
      Rectangle
      {
          color: getWhiteOrBlack(index)
  
          opacity: 0.45
          width: getSquareSize()
          height: getSquareSize()
  
          x: getX(index)
          y: getY(index)
  
          MouseArea
          {
              anchors.fill: parent
              onClicked:
              {
                  pawn.x = parent.x
                  pawn.y = parent.y
  
                  if (starting_position == false)
                  {
                      starting.x = parent.x
                      starting.y = parent.y
                      starting_position = true
                      starting_index = index
  
                      ending.visible = false
                  }
                  else
                  {
                      ending.visible = true
                      ending.x = parent.x
                      ending.y = parent.y
                      ending_index = index
  
                      Board.move(getRow(starting_index), getColumn(starting_index), getRow(ending_index), getColumn(ending_index))
  
                      starting_position = false
                  }
              }
          }
  
          SequentialAnimation
          {
              running: true
              loops: Animation.Infinite
  
              ColorAnimation
              {
                  to: "green"
                  duration: 500
              }
  
              ColorAnimation
              {
                  to: "transparent"
                  duration: 500
              }
          }
      }
  }
  </code></pre>
  
  <p>However, whenever I click on the button that is supposed to trigger the green flash, it doesn't flash.</p>
  
  <p>I don't know how to get the flashing to work when a button is clicked and would greatly appreciate any help on how to accomplish this, thanks.</p>