Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by bea

Hi!
I'm using AppiMobi to develop my games with impact, and I tried to use music and effect.
When I try to use ig.sound, it doesn't work. AppiMobi show me an error, it couldn't load a mp3 or ogg file.
Instead of use ig.sound, I tried to use AppMobi.player.startAudio, but AppiMobi show the next message.
Uncaught TypeError: Cannot call method 'startAudio' of undefined
How can I fix that?

I could use that method in my index.html, but not in my main.js.
Please help!
(Sorry for my english, I'm spanish!)

1 decade ago by TylerAppmobi

If you're using directCanvas, you have to wrap that command to tell the webview to execute it, like so :
AppMobi.webview.execute('AppMobi.player.startAudio("songs/radiohead.mp3")')

This goes for anything that you want to send to the webview from DC. You can also use the command AppMobi.canvas.execute("") to send information from index.html to the DC layer.

1 decade ago by bea

Thanks! Now it works perfectly
Page 1 of 1
« first « previous next › last »