-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Hi, noobs here!
question is... How to check that sound is already load?
so i can just play if sound already load...
far as i try is
var si:SoundInstance = SoundAS.getSound("somesound");
but at present it will throw error if it not exist, i did expected null for first load then call SoundAS.loadSound if si is null e.g.
if(!si)
SoundAS.loadSound("somesound.mp3", "somesound");
and if i load sound via SoundAS.loadSound again without check for existing
SoundAS.loadCompleted is seem to be never fire for second load same url and type.
btw, i don't think it's a good idea to try catch there. "null for non exist SoundAS.getSound" should be better there.
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels