I have an Adobe Animate file. I am trying to set a linkage tag to the .mp3 file in the library that that I can use something like this
createjs.Sound.play("mySound");
For other objects in the library I am able to click on the linkage area of the objet and type in my name. But for the .mp3 its opening up the Sound Properties. I have seen examples with the linkage set, but haven't figure out a way to set the linkage property myself. Here is a screen grab of where I'm talking about.
Instead of including the .mp3 file in the .fla itself, I find it much more proper to put your sound file/s in an external folder and then load it like:
createjs.Sound.on("fileload", handleFileLoad);
createjs.Sound.registerSound("[path/]MySound.mp3", "MySound");
function handleFileLoad()
{
createjs.Sound.play("MySound");
}
By doing so, you can assign the sound file to a variable and then manipulating it, like volume, number of loops or adding "complete" events to it.
Also, if you have multiple sound files, you can preload them all at once using the manifest loader, which will also automatically register them for playing by using their "id" at any time.