Highlighted

new way to use sound with ANCC 2020

Adobe Community Professional ,
Dec 13, 2019

Copy link to clipboard

Copied

It noticed there is a difference in the way to use sound files with the new version. After reading the documenation I used this:

of course it is still ok to add sounds on the timeline. I personally never since I prefer to control things in events.

// if I want sounds to loop
var props = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: -1, volume: 0.5})	

// no looping
var single = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: 0, volume: 0.5})	

// call the sound file with loop. music is the linkage name in the library
this.music = createjs.Sound.play("music", props);
// sound that does not loop - wrong is te linkage name in the library
createjs.Sound.play("wrong", single);

 

TOPICS
Code, How to

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

new way to use sound with ANCC 2020

Adobe Community Professional ,
Dec 13, 2019

Copy link to clipboard

Copied

It noticed there is a difference in the way to use sound files with the new version. After reading the documenation I used this:

of course it is still ok to add sounds on the timeline. I personally never since I prefer to control things in events.

// if I want sounds to loop
var props = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: -1, volume: 0.5})	

// no looping
var single = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: 0, volume: 0.5})	

// call the sound file with loop. music is the linkage name in the library
this.music = createjs.Sound.play("music", props);
// sound that does not loop - wrong is te linkage name in the library
createjs.Sound.play("wrong", single);

 

TOPICS
Code, How to

Views

97

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2019 0

Have something to add?

Join the conversation