I have used the following code and I am not sure why it is not working.
from PythonCard import model
playSound = 1
class MainWindow(model.Background):
pass
app = model.Application(MainWindow)
app.MainLoop()
if playSound == 1:
s = Sound()
s.read('start.wav')
s.play
playSound = 0
使用括号来调用函数:
s.play()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.