Jump to content

Search the Community

Showing results for tags 'setDecodedCallback'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi, I'm trying to check if the audio is ready before start the MainMenu. create: function () { this.addGameSrc(); Vendor.addSound(); Vendor.addMusic('main_menu', true); audios = [ music, sfx_Click, sfx_Drop, sfx_Explode ]; console.log(audios); this.status.setText('DECODING AUDIOS...'); this.sound.setDecodedCallback(audios, this.start(), this); }, start: function () { this.status.setText('READY'); setTimeout(function () { game.state.start("MainMenu"); }, 250); console.log("Splash\t\tOK"); },ERROR: TypeError: this._watchCallback is undefined I also tried this code: create: function () { this.addGameSrc(); }, update: function () { if (game.cache.isSoundReady('click', 'main_menu')) { this.startMenu(); } else { this.status.setText('DECODING AUDIOS...'); }; }, startMenu: function () { this.status.setText('READY'); this.state.start("MainMenu"); console.log("Splash\t\tOK"); },But it takes so long for decode, tested with S6 Edge and about 10 seconds waiting, doesn't matter if the audio is an mp3 or ogg with 5k or 500k, if it's one single file or ten files, make no sense for me... Plz, Someone can help me to fix this?
×
×
  • Create New...