'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in ...pkg:/source/appHomeScreen.brs(662)
662: sound.trigger("75")
sound = CreateObject("roAudioResource", "pkg:/sounds/arrow_x.wav")
sound.Trigger(75)
sound = CreateObject("roAudioResource", "pkg:/sounds/arrow_x.wav")
sound.trigger(75)
sound = CreateObject("roAudioResource", "pkg:/sounds/arrow_x.wav")
sound.Trigger("75")
sound = CreateObject("roAudioResource", "pkg:/sounds/arrow_x.wav")
sound.trigger("75")
sound_squish=CreateObject("roAudioResource", "pkg:/assets/sounds/squish.wav")
sound_squish.Trigger(100)
my_sound = CreateObject("roAudioResource", "pkg:/sounds/4ch.wav")
print"Type(my_sound) = " ; Type(my_sound)
Debuger:
Type(my_sound) = Invalid
"lock_4815162342" wrote:
When I create the roAudioResource object and then check the type it is saying that it is invalid. I am using a 44100 Hz wav file.
m.beep=CreateObject("roAudioResource", "pkg:/locale/default/images/rokusound")
"lock_4815162342" wrote:
When I create the roAudioResource object and then check the type it is saying that it is invalid.
BrightScript Debugger> ? createObject("roFileSystem").exists("pkg:/sounds/arrow_x.wav")
false
"squirreltown" wrote:I will take a guess: perhaps while working on a Mac, the file has been "Save As..."-ed in WAV format but without adding the ".wav" suffix in the name? Do a Get Info (Command-i) on the file and see what it says under "Name & Extension".
... in fact I can't shed a bit of light on why I had to do it that way, but it never worked for me with the .wav extension and did work when i removed it.