I'm simply trying to make a CLICK sound when a user clicks on a button.
I have a 1 second audio clip (or 1.018 seconds according to Audition).
The ONLY thing in this file is a this.stop(); and a simple button with the following code:
While it WORKS the sound is being stretched long and/or distorted into a completely different sound.
In the Library it sounds fine.
I've tried the sound as a WAV and MP3.
I hope someone here can tell me what I'm doing wrong.
I'm still on Animate 21.0.9 at my office. I'll try it on the most recent version when I get home, but I don't think that's it.
Thank you again!
this.alreadyExecuted = true;
Okay, why does this need to happen? Why is it playing badly and what about this code fixes it?
I'm genuinely trying to understand why this is needed.
Sorry, no, that did not fix the audio issue. It still plays but sounds like it's playing in slow motion and stretched out.
i thought you might be readding the listener (which occurs if the frame replays) and causing the distortion. the code i suggested fixes that.
you could open that sound in audition and then resave as a 16 bit sound and 44 khz sample rate (even if those are the current settings). then reimport the sound.
if that fails someone will probably need to download your fla to determine the cause and fix.
Even though Adobe Animate was SHOWING 44100 khz and 16 bit:
The file was actually 24-bit when I opened it in Audition...
And yes that fixed it. Thank you!!!
(p.s. i've encountered the same issue and fix myself.)