A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: On/Off Sound

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    3

    Question

    Hi:
    Ok, i'd like to know an easy way to use a button to toggle looping music. I've tried looking in the resource section, but i'm still stuck. I've used the "stop all sounds" but i cant make it start again. plz help, thanks!

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,092

    Thumbs up

    if you want i can send you a .fla?

    get back with me...

    later...


    <EMBED src="/cgi-bin/ubb/Members/sigs/00000085.swf" quality=high WIDTH=500 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  3. #3
    Junior Member
    Join Date
    Mar 2000
    Posts
    3

    Post


    I'm sorry for taking so long to reply. But please do send me a .fla showing how to toggle on/off sound. thanks a lot!

  4. #4
    Hack
    Join Date
    Mar 2000
    Location
    Madison, WI
    Posts
    1,753

    Post

    For anyone else with the same question, here's the basic theory.

    Make a movie clip with two labels, on and off, at say frame 1 and frame 10.

    Place your music in frame 1, looping it 999 times, and a Stop action in frame 9. Place a "Stop all sounds" command in frame 10, and a Stop command in frame 20.

    In addition, place a button in frames 1-9. This will be your "music off" button. On Release, it should "Go To and Play" label "off." In frames 10-20 place an identical (or at least similar) button which, On Release, "Goes To and Plays" label "on."

    Bring that movie into your main scene, and you should be good to go.


    Erlenmeyer

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,092

    Exclamation

    I need your e-mail address.
    I checked your profile and did not list your e-mail address.

  6. #6
    Junior Member
    Join Date
    Mar 2000
    Posts
    11

    Post

    I agree with you erlenmeyer71 but whats happen when stop your sound and go into an other scene an come back again... does the sound start automaticly than ?
    Isn`t it a better way to put you sound into anoteher swf and load that movie into an seperat layer?
    so your swf wil be much smaler.

    cheers
    <EMBED src="/cgi-bin/ubb/Members/sigs/00001422.swf" quality=high WIDTH=400 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

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