Cocos2d-JS - sync audio effects

Cocos2d-JS v3
  • fabiotgarcia
    Likes 0

    Problem Description

    Hi there!

    I’m new on Cocos2d-JS

    How can I sync sound effects with my character.

    In my game I have a dragon that at any given time flamethrower from his mouth.

    Best Regards,

     

    Fábio


  • Sonar Systems admin
    Likes 0

    Just play it within the same method or bit of code that animates the dragon and make sure the animation length is the same as the sound effect length.

  • fabiotgarcia
    Likes 0

    Hello Sonar! Thanks for your answer.

    I’m using Spine to animate it and using Json.

    Do you have some tutorials about it?

     

    Best Regards,

     

    Fábio

  • Sonar Systems admin
    Likes 0

    No we do not.

  • fabiotgarcia
    Likes 0

    Do you if is it possible to sync sound effects using Spine/Json?

    I know spine can save events, but I didn’t find any document about using these events exported to Json to sync audio.

     

Login to reply