1

I'm trying to play a sound in a Dashcode widget. I just droped the file over the widget and now I a video item.

This is the code I'm using:

// Values you provide
var qtElement = document.getElementById("video"); // replace with the ID of a QuickTime element
// QuickTime code
qtElement.Play();

When it gets to the final line I got this error:

"Undefined is not a function"
Jorge
  • 2,156
  • 2
  • 22
  • 29

1 Answers1

1

I just solved the issue on my own widget via using

var qtElement = document.getElementById('AlainVoice');
// QuickTime code
qtElement.children[0].play();

The important part is the children[0] since Dashcode now puts the Id on an enclosing div.

Kheldar
  • 5,361
  • 3
  • 34
  • 63