Using instruction blocks to control animations