View Single Post
  #1  
Old 03-13-2008, 10:01 AM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
audio object string

The following script contains a function which attempts to play
an audio file which is passed as
an argument. Before calling the function I want to construct the
name of the audio object by concatenating character strings, but
it doesn't work. Can you tell me the correct way to do this?

Code:
from viz import *

go()

sound1 = add('boing!.wav')

def playit(snd):
	snd.play()

num = 1
s = 'sound'+str(num)

playit(s)
Reply With Quote