Closed amex4152 closed 9 years ago
Hi there.
In doubt, always refer to the example assetPack.json
, included with Phaser — its in resources/Asset Pack JSON Format
directory, inside the Phaser package.
Anyway, to declare any new audio asset to use in your game, do as below:
{
key: 'totta',
type: 'audio',
urls: [ 'totta.ogg' ]
}
I should have included an commented example to that file, should do it in a next release.
(Edit: Oh, I got distracted and closed the issue by accident, sorry!)
Thank you!
It worked, I wrongly assumed that the parameter was exactly like the other 2, using "url" instead of "urls", and yes, a commented example would be wonderful.
Now, Should I close this issue or leave it open until next release ? (Sorry, I'm new to GitHub)
Don't worry. I'll close the issue later with a commit.
Hello there,
It seems that the audio assets are not loading correctly, I tried ogg and mp3 files without success:
In the assets.js file:
// - Music and Sound effects ------------------------------------------------ 'audio': [ { key: 'totta', type: 'audio', url: 'totta.ogg' } ]
Gives error:
Uncaught TypeError: Cannot read property 'length' of undefined
I didn't find any email to check first if this is really an issue or an error from my part...
Regards