Developers Manual > Cocos Studio > Scene Editor > Scene Component > Scene Component ComAudio

Scene Component ComAudio

Icon

Description

The ComAudio component contains the function of playing a mp3 or wav type file. After binding to a ComAudio component, a NULL object will be modified to a ComAudio object.

Properties

For more information, see Scene component general properties.

Feature

Name

The audio’s filename,which can let us get component in programs (getComponent). The component’s name can be amended and the default name is CCComAudio.

AudioFile

The path of mp3 or wav type file.

Loop

Set it to loop the audio or not.

PlayControl

  • Play:Plays audio.
  • Stop:Stops playing audio.

5-3-6-img-01.png (1.3 kB) hanrea@qq.com, 2013-12-04 08:43

5-3-6-img-02.png (6 kB) hanrea@qq.com, 2013-12-04 08:43

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.