1 Replies - 3278 Views - Last Post: 20 January 2010 - 09:07 PM

#1 midodido  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-January 10

Stop/Play Sound using Button

Post icon  Posted 11 January 2010 - 07:01 PM

im making a flash game, its an original snake game.

I want to add music using a button.
What ive done was taken a button from the built in library. Ive gone into the editing mode, and on one of the keyframes, i went to properties and from the "SOUND" drop down menu i clicked on the sound that i imported. Now, when i click on the button the music plays. Is there a way to make it stop once clicked again?
Is This A Good Question/Topic? 0
  • +

Replies To: Stop/Play Sound using Button

#2 creativecoding  Icon User is online

  • Hash != Encryption
  • member icon


Reputation: 786
  • View blog
  • Posts: 2,968
  • Joined: 19-January 10

Re: Stop/Play Sound using Button

Posted 20 January 2010 - 09:07 PM

onClipEvent(Release){
stopAllSounds();
}


Or

onClipEvent(Release){
mySound.stop(["idName"])
}

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1