WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
Child Object Rotation paulgoldberg Vizard 5 09-05-2006 11:33 AM
when collision mode is on, can i "turn it off" for an individual object? Vdoug Vizard 1 09-22-2005 12:14 PM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM
Getting the String of a Text3d Object vjosh Vizard 1 01-03-2005 11:37 PM


All times are GMT -7. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC