Code:
on (press) {
  if (_root.thecount == 0){
    _root.A1._visible=false;
    _root.thecount = 1;
  } else if (_root.thecount == 1){
    _root.A1._visible=false;
    _root.thecount = 2;
  } else {
    stop();
  }
}