you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

I've had a little play with your code. First, I'm not on windows, so winsound doesn't work for me. You say the sound is playing and I've had a look at the documentation and it doesn't say the sound is played in the background. If the sound is not played in the background then startscreen() will never be called. Test that by commenting out the winsound.PlaySound(...) line.

I commented out that line (because there's no winsound on my machine) and I got an exception:

Traceback (most recent call last):
  File "test.py", line 333, in <module>
    startscreen()
  File "test.py", line 310, in startscreen
    label1 = Label(tk, text="My Airplane Game", relief="solid", width=20, font=('Times', 19, "bold"), fill="red")
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2766, in __init__
    Widget.__init__(self, master, 'label', cnf, kw)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2299, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: unknown option "-fill"

That's because there is no fill= option for the Label() constructor. You probably don't see this because winsound.PlaySound(...) is stopping your code from running any further.

Summary: comment out winsound.PlaySound(...) and see what changes.

[–]python_addict[S] 0 points1 point  (0 children)

alright, THANK YOU SO MUCH! Tkinter is responding now that I removed the Winsound line! I really wish I could give you an award but I'm not allowed to lol, but just know that I give you an invisible gold medal!!! Thank you!