Copy link to clipboard
Copied
I'm currently working on a soundboard in Flash CS5 Actionscript 3.0, I am somewhat new to this, so I was wondering if anyone still knows how to set it so I can press the spacebar to stop all of the sounds currently playing. Would help me a lot and I would much appreciate a response. Thanks!
You would want to create an event listener on the keypress, and a corresponding callback function to stop the sounds.
https://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d01.html
But like other folks have pointed out, you'd be far better off building an equivalent in JavaScript unless there's a profoundly compelling reason to use Flash (you're maintaining a legacy application in an enterprise environment, etc). Animate CC lets you output animation to native web techno
...Copy link to clipboard
Copied
"I'm currently working on a soundboard in Flash CS5 Actionscript 3.0"
I don't mean to be flippant, Lester5E61, but why bother?
Flash Player is being permanently discontinued in a couple of weeks. Without a player, nobody will be able to do anything with your Flash-based app.
https://www.adobe.com/products/flashplayer/end-of-life.html
Suggest you switch from outdated Flash CS5 to modern Animate CC.
Copy link to clipboard
Copied
You would want to create an event listener on the keypress, and a corresponding callback function to stop the sounds.
https://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d01.html
But like other folks have pointed out, you'd be far better off building an equivalent in JavaScript unless there's a profoundly compelling reason to use Flash (you're maintaining a legacy application in an enterprise environment, etc). Animate CC lets you output animation to native web technologies. I'd highly recommend downloading a trial, and checking out the Animate CC forums.