cc.AudioEngine is undefined

cc.AudioEngine is undefined
0

#1

I created a empty new project using

cocos new DemoJS -p net.comtor.games.demojs -l js -d DemoJS

I try to instantiate audio engine using:

    var audioEngine = cc.AudioEngine.getInstance();
    audioEngine.playEffect(res.bounce_mp3);

Browser reports next error.

TypeError: cc.AudioEngine is undefined

What I am doing wrong?


#2

It should be cc.audioEngine
http://docs.cocos2d-x.org/api-ref/js/V3.13/


#3

thank you. It works.