use halfdelay to set animation delay