I’m trying to access the file by opening it with a dialog window, then assigning its name to FN string variable and then loading it with sound.load
I can’t find a way…Any help will be appreciated! Cheers!
try removing string declaration in your if (result.bSuccess) block.
In your case, the path and FN from the if block are local to the block and get undefined when you leave the block. On the other hand, the initial declarations never get any value.
Yes.
Beware that with this code you will also need to set FN to a default value when ofSystemLoadDialog fails.
If you’re not interested by FN elsewhere in your code then you could leave path and FN as local variable and put the sound commands in the if block. Something like :