![]() |
|
#2
|
|||
|
|||
Here is an example script that uses the viztask module to loop through a playlist of songs. Let me know if anything is unclear.
Code:
import viz import viztask viz.go() PLAYLIST = ['crash.wav','BOING!.WAV','quack.wav'] def PlayMusicTask(songs): """Task that loops through a playlist of songs""" #Preload all songs songCycle = viz.cycle([ viz.addAudio(filename) for filename in songs ]) #Loop indefinitely through song list while True: #Play next song song = songCycle.next() song.play() #Wait for song to end yield viztask.waitMediaEnd(song) #Schedule music task viztask.schedule( PlayMusicTask(PLAYLIST) ) |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Little Programming Problem with MultiDimensional Arrays | shivanangel | Vizard | 2 | 04-25-2007 12:21 PM |
5DT Data Glove 5 Ultra Problem | bjgold | Vizard | 1 | 08-08-2006 04:08 PM |
problem with female animations | vmonkey | Vizard | 1 | 10-07-2005 10:36 AM |
Copy objects in an array to another array | Johannes | Vizard | 3 | 04-29-2005 02:37 PM |
PROBLEM: Picture-in-Picture breaks textures?!? | vcarlson | Vizard | 4 | 10-05-2004 04:22 PM |