class WaitForEvent(WaitInterval,DirectObject):
def __init__(self, events):
WaitInterval.__init__(self, 9999)
for e in events:
self.acceptOnce(e, self.test)
def test(self):
print self.getState(),self.isStopped (),self.isPlaying ()
self.finish()
print self.getState(),self.isStopped (),self.isPlaying ()
Sequence(Func(video.play),Func(sound.play),WaitForEvent(["mouse1", video.getFinishedEvent()]),Func(self.openAP)).start()