from tkinter import * from tkVideoPlayer import TkinterVideo num = 1 home = Tk() home.geometry("500x500+500+200") home.title("1 LVL") videoplayer = TkinterVideo(master=home, scaled=True) def print_key(event): global num args = event.keysym, event.keycode, event.char print("Знак: {}, Код: {}, Символ: {}".format(*args)) if event.keycode == 87: # KEY W if num != 10: num += 1 home.title(f"{num} LVL") play_video(num) elif event.keycode == 83: # KEY S if num != 1: num -= 1 home.title(f"{num} LVL") play_video(num) def play_video(num): videoplayer.load(f"UpGrow/{num}.mp4") videoplayer.pack(expand=True, fill="both") videoplayer.play() home.bind("<Key>", print_key) play_video(1) home.mainloop()
Как сделать чтобы этого мигания не было?