0

I am using the Clock module in kivy.clock. I have 5 different images that need to be constantly checked for coordinates from LEAP Motion. The current code works perfectly, however I am unable to figure out why, when iterated, only the last scheduled event occurs. (The count function correctly reads the number of pictures)

    # for i in range(0, count):
    #     Clock.schedule_interval(lambda dt: self.animate(picture[i], (i - 2) * 300), 1.0 / 60.0)


    Clock.schedule_interval(lambda dt: self.animate(picture[0], -600), 1.0 / 60.0)
    Clock.schedule_interval(lambda dt: self.animate(picture[1], -300), 1.0 / 60.0)
    Clock.schedule_interval(lambda dt: self.animate(picture[2], 0), 1.0 / 60.0)
    Clock.schedule_interval(lambda dt: self.animate(picture[3], 300), 1.0 / 60.0)
    Clock.schedule_interval(lambda dt: self.animate(picture[4], 600), 1.0 / 60.0)

0 Answers0