PDA

View Full Version : addVideo problems


CRI
06-04-2010, 10:33 AM
When I enter CODE


import viz
viz.go()

object = viz.add('cylinder.wrl')
video = viz.addVideo('mona.mpg')
video.rate(.5)
object.texture(video)

video.play()


It can not show my video and sound

Jeff
06-04-2010, 12:57 PM
That file does not have audio and since it is not playing in loop mode you may not notice that it plays for a few seconds when the script begins. In the following the video will also play when the spacebar is pressed:
import viz
viz.go()

object = viz.add('cylinder.wrl',pos=[0,1.5,1])
video = viz.addVideo('mona.mpg')
video.rate(.5)
object.texture(video)
video.play()

vizact.onkeydown(' ',video.play)