Jump to content


Photo

Chapter 9 Code Problem


  • Please log in to reply
6 replies to this topic

#1 Tanner G Seymour

Tanner G Seymour

    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 29 April 2015 - 04:52 PM

from tkinter import *
import pygame.mixer
 
app = Tk()
app.title("Head First Mix")
app.geometry('250x100+200+100')
 
sound_file = "50459_M_RED_Nephlimizer.wav"
 
mixer = pygame.mixer
mixer.init()
 
def track_start():
    track.play(loops = -1)
    
def track_stop():
    track.stop()
    
track = mixer.Sound(sound_file)
 
start_button = Button(app, command = track_start, text = "Start")
start_button.pack(side = LEFT)
 
stop_button = Button(app, command = track_start, text = "Stop")
stop_button.pack(side = RIGHT)
 
app.mainloop()
 
 
the error message:
 
Traceback (most recent call last):
  File "C:/Python34/guessing game/DJ'S_Mixer.py", line 2, in <module>
    import pygame.mixer
  File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
 
any thoughts? :)
 


#2 Tanner G Seymour

Tanner G Seymour

    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 04:31 PM

bump please i'm in need of help. I really wanna finish this book and move onto java but I cant because I don't want to skip the last 2 chapters



#3 Tanner G Seymour

Tanner G Seymour

    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 03 May 2015 - 05:07 PM

bump help please



#4 #TM#

#TM#

    Active Member

  • Members
  • PipPipPip
  • 91 posts
  • Gender:Not Telling

Posted 04 May 2015 - 09:54 AM

I think this is due to incomplete pygame installation.

 

I will try to come up with a tut to solve this. will take a day or so. smile.pngrolleyes.gif



#5 Tanner G Seymour

Tanner G Seymour

    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 04 May 2015 - 04:42 PM

thank you so much! ill be looking forward to it!



#6 #TM#

#TM#

    Active Member

  • Members
  • PipPipPip
  • 91 posts
  • Gender:Not Telling

Posted 05 May 2015 - 05:36 AM

Hi Tanner,

 

Follow My Blog Link

 

If any problem still persists, let me know.

 

smile.pngcool.png



#7 Tanner G Seymour

Tanner G Seymour

    Active Member

  • Members
  • PipPip
  • 10 posts

Posted 07 May 2015 - 05:48 PM

Hi Tanner,

 

Follow My Blog Link

 

If any problem still persists, let me know.

 

smile.pngcool.png

worked like a charm! thank you so much for the help! i can now continue on to the java book






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users