# Problem with sound on a button in Flash 8

**URL:** <https://forum.kirupa.com/t/problem-with-sound-on-a-button-in-flash-8/174357>\
**Category:** flash\
**Created:** [January 5, 2006, 12:40am UTC](https://forum.kirupa.com/t/problem-with-sound-on-a-button-in-flash-8/174357 "2006-01-05T00:40:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Deb](https://forum.kirupa.com/u/Deb)\
**Post date:** [January 5, 2006, 12:40am UTC](https://forum.kirupa.com/t/problem-with-sound-on-a-button-in-flash-8/174357/1 "2006-01-05T00:40:22Z")

</div>

I am using Flash 8 Pro and trying to play an mp3 on hit in a button. Everything worked perfectly in Flash MX but in 8 the action script is not working.

Original script is

on (press) {  
stopAllSounds();  
}  
on (release) {  
play();  
}

now I get a message

are permitted only for button instances  
on (release) {

I even named the button instance and still doesn’t work. Any help would be appreciated.
