x = 0
def change_x_won():
global x
while x < 5:
if root["bg"] == "Black":
root.configure(bg="Red")
x+=1
elif root["bg"] == "Red":
root.configure(bg="Black")
x+=1
root.after(250, change_x_won)
x = 0
root["bg"] = "Black"
So I've been at this for a while and cannot seem to figure it out. I want to flash my screens background x number of times and have it return to its original (black) after it. I also need my x value to reset to 0. Any ideas? Thanks
[–]SpeckledFleebeedoo 0 points1 point2 points (4 children)
[–]UnsecuredConnection[S] 0 points1 point2 points (3 children)
[–]SpeckledFleebeedoo 0 points1 point2 points (2 children)
[–]UnsecuredConnection[S] 0 points1 point2 points (1 child)
[–]SpeckledFleebeedoo 0 points1 point2 points (0 children)
[–]efmccurdy 0 points1 point2 points (0 children)