问题

(2013·四川省乐山一模)The pupils were playing games in the classroom ________ a gunman entered and began shooting wildly at them

A:while
B:when
C:as
D:before
正确答案是: