Documentation

  Working with sounds

The GAF Converter version 5.0 can extract sounds from animations inside SWF file and save them along with other GAF files for further playback. To turn this option on go to Conversion Settings Dialog → Conversion Panel → select Extract sounds checkbox. That's it. Now you can convert animations with sounds, and GAF Converter will extract them along with information about when each sound starts and stops playing during an animation playback.

 

How to add sound to an animation in FLA

Import sound into FLA file using one of the familiar ways.

standalone gaf converter

You can use any audio format supported by Flash Pro. But while publishing SWF, it should be converted into the MP3 audio format, because GAF Converter works only with MP3. By default, Flash Pro converts all sounds into MP3 audio format during publishing SWF. But you can adjust it anytime in Publish Settings.

standalone gaf converter

To place sound inside an animation you need to open corresponding Movie Clip, create a new layer with a name "Sound", create Keyframe in the place where you want to start playing a sound, select the keyframe and set up Sound options in Properties panel.

You can select one of the supported Sync: Event, Start, Stop (Note: Stream is NOT supported). Also, you can adjust Repeat count or Loop a sound. Note: Effect is not supported yet by GAF Converter.

standalone gaf converter

That's it! Now you can Publish SWF and convert it into GAF. And don't forget to enable Extract sounds checkbox in Conversion Settings Dialog before conversion.

 

How to playback a GAF animation with sound

Starling GAF

starling

Example how to work with sounds in Starling GAF library you can find in the sound_example sample in the demo directory.

 

Cocos2D-X v3 GAF

cocos2d-x

Example how to work with sounds in Cocos2d-x GAF library you can find here on github. See 'SoundsExample_Tank' animation and check GafFeatures::onSoundEvent method.

 

Cocos2D-JS GAF

unity

Example how to work with sounds in Cocos2D-JS library you can find in the sound_example sample in the demo directory.

 

Unity3d GAF

unity

Supported by GAF Free: Flash to Unity and GAF Pro: Flash to Unity starting from 5.0 version.