I'm just not exactly sure how you want the bobbing buttons to work but here is some code that will get the sound working correctly.
It's a little different approach but hopefully you can adapt at least parts of it.
First I created the 2 buttons as movie clips. In this case they are 20 frames long with a bouncing action. Gave them the same names you used. No actions or sound attached to either, just the bouncing. These where created in the library and not yet on the stage.
The main timeline is just one frame. Drag the 2 movie clip buttons onto the stage and give each the instance names you used, bubble01on and bubble01off
Then in actions layer attached the sound but turned it off so it's not playing all the time
then added the actions for the buttons, but added the stop sound to the "on" button to stop any previously playing sounds.
Code:
var my_sound = new Sound();
my_sound.attachSound("bubble_01sound");
my_sound.stop();
bubble01on.onRelease = function() {
_root.my_sound.stop();
_root.my_sound.start(0,1000);
}
bubble01off.onRelease = function() {
_root.my_sound.stop();
}
This solution seems to work just fine when I tested it. No sound until the bouncing "on" is pressed. Press "on" again and the sound starts over, no overlap. "off" stops the sound.
Best wishes,
EfV