A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Music On/Off

  1. #1
    Junior Member
    Join Date
    Apr 2000
    Posts
    2

    Post

    My fla contains soundeffects (eventsounds playing once, attached to buttons), and backgroundmusic (eventsound looping 999 times).
    I want the user to have a music on/off -button that does NOT affect the soundeffects.
    Problem is, my bkgmusic starts and stops (by keyframeactions) many times at different places in different scenes throughout the movie.
    When the user has turned off the music I want it to stay off and not start again. How can this be done?

  2. #2
    Member
    Join Date
    Mar 2000
    Location
    Bay Area, California, USA
    Posts
    54

    Cool

    I'd do it like this:

    Make a movie clip called "Loop" or whatever. Put your audio in there. Then place that on its own layer in the main timeline. Then, instead of using a Stop all sounds action in your stop music button, do a tell target that says (roughly): Tell Target "Loop" Stop.

    Should work...

    Josh

  3. #3
    Member
    Join Date
    Mar 2000
    Location
    Bay Area, California, USA
    Posts
    54

    Exclamation

    Wait, I read your question again, and I don't think my answer (above) will help you. You'll have to do some kind of If Else statment, which is not my area of expertise.. Maybe somebody else can be a better help...

    Sorry...

    Or, wait, you could use a more realistic loop like 10 times with a go to 1 action at the end of those ten loops.

    Then your sound off button could tell that Loop movie and any audio movies you have made to go to a frame after your loop, say frame 2000 and Stop and in frame 2001-5 (or whatever) put stop actions. Then when you do a tell target to start your audio in a given audio movie it should say tell target "Loop" (for example) Play. That way it will just be stuck at the end. If people want to play audio a play button could tell all your audio movies to go to frame 1.

    Eeeee, I have never tried anything like this. If it works, I'd love to know...

    Good luck
    Josh

  4. #4
    Junior Member
    Join Date
    Apr 2000
    Posts
    2

    Post

    Thanks
    I'll give it a try and will let you know if it works.

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