A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Three buttons - Want to play audio upon clicking the play button - Help required

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    22

    Three buttons - Want to play audio upon clicking the play button - Help required

    I am near the end of my quiz however there still one item i am having trouble with, I wish to have three buttons:

    1. a play button instance name: play_btn
    2. a pause button instance name: pause_btn
    3. a stop button instance name: stop_btn

    I wish for the play button to play a single mp3, the pause to pause the song and the stop button to reset the song back to the start without it playing the mp3 again unless the play button is pressed.

    I have no idea how to do this and from the research I’ve done I cannot find anyone else who is doing the same in AS3 (including this forum).

    Cheers,
    Callum

  2. #2
    Junior Member
    Join Date
    Sep 2009
    Posts
    16
    I believe you are in need of the soundChannel:

    http://help.adobe.com/en_US/AS3LCR/F...ndChannel.html

    look at the example. Note how the play works, kinda funny:

    soundChannel=sound.play();

    but for stop/pause it is soundChannel.stop();

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    23
    Quote Originally Posted by Prozac500 View Post
    I have no idea how to do this and from the research I’ve done I cannot find anyone else who is doing the same in AS3 (including this forum).
    obviously my friend ... your researching abilities are pretty subpar

    found this one first google search:

    http://flashspeaksactionscript.com/c...player-in-as3/

    it doesn't have you pause button in but like I said ... first search, first result. I would do a little more looking around.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center