View Single Post
  #2  
Old 03-13-2008, 11:06 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Are you trying to look up a Python object by its name? The following will look up the name in the current global variable scope and play the sound if it exists:
Code:
def playit(snd):
	soundObject = globals().get(snd,None)
	if soundObject is not None:
		soundObject.play()
Reply With Quote