-
Notifications
You must be signed in to change notification settings - Fork 45
How to check that sound is already load? #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have a same problem. public function getSound(type:String, forceNew:Boolean = false):SoundInstance if specfied type is not found, it will throw new error, and this error not catch in SoundManager. so is should possible add catch in that "try...finally" code block ? or if not found specfied sound, do not fire a error, just trace a message? or maybe add a new method containSound? |
I changed it locally so that |
I did the same on my side. |
yes please add support for containsSound! |
SoundAS.getSound('XXX').sound.addEventListener(Event.COMPLETE,COMPLETE); |
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
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.
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
The text was updated successfully, but these errors were encountered: