newbie Question here…
How to implement howlerjs on openfl?
I did this- doesnt seem to work ->http://adireddy.github.io/haxe-howler/.
newbie Question here…
How to implement howlerjs on openfl?
I did this- doesnt seem to work ->http://adireddy.github.io/haxe-howler/.
The latest openfl.media.Sound
object uses lime.audio.AudioSource
, which uses howler.js under-the-hood on HTML5
So:
var sound = Assets.getSound ("assets/sound.ogg");
sound.play ();
@singmajesty. Thanks for reply.
I’ve try that already it didn’t give me a luck… I’m Doing a space shooter game for HTML5 target only and every time a bullet hit the enemy i play the explosion sound.But after 20x up. it crashes. However, after i figured how to use howlerjs it works just fine now… it cache sound very well…
Here’s the sample, just incase someone have a same problem…
import lime.audio.howlerjs.Howl;
import lime.audio.howlerjs.Howl.HowlOptions;
class Game extends Sprite{
var snd :HowlOptions;
var explosionSnd:Howl;
public function new() {
snd = { src: ['sound/implo3.ogg']};
explosionSnd = new Howl(snd);
// play it somewhere else like ON ENTER FRAME
explosionSnd .play();
}
}
CCould you post a link to the sound you’re using somewhere? I’d like to try and replicate the crash you’re seeing. What OpenFL version, what browser? Thanks
i using flashdevelop.
here’s the sample i made ->https://www.dropbox.com/s/u21zfno9qgbb2qt/SampleSound.rar?dl=0, i tested it chrome and firefox only…
i am using the latest update of openfl… try to run it for an hour. i hope i am right but really gives me the performance.My game now running at full 60 FPS… Awosome.
the Dropbox has a virus it hit me. dont download it. it got my other computer. Sorry.