A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Resume background music playback out of frame

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    2

    Resume background music playback out of frame

    Hi all,

    So I have a Flash CS5 presentation which uses ActionScript 3.0, and currently is completely finished except for the addition of background music.

    One of the pages has audio files which the user can select and listen to, and another page has video files for the user to select and watch.

    As a result, I will need the background music to pause/stop itself before it reaches those frames in the movie, and start itself when leaving those frames.

    Alternatively, a button for the user to click and the background music will pause or resume.

    I have tried multiple methods, and currently have the background music playing from frame 1 (with the "pause/resume button" event listener) to the end. The pause button will work anywhere in the movie, but the background music will not resume at all - not even from the beginning.

    Ive scoured the internet and Im beginning to wonder if its even possible anymore? I assume that this is because the song isnt loaded past frame 1?

    Any help would be greatly appreciated.

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    How exactly are you doing it?
    The task you describe should be pretty simple.

    Here's an example on how to pause and resume sound.

  3. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    2
    Thanks for your help. I had a look at that tutorial and it has turned out to be a fairly simple fix. I think I may have been over complicating it some what with a whole bunch of if/if else/else statements, and a typo that probably didnt help much either.
    Thanks again

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    Russia: Western Siberia
    Posts
    268
    It would be better to create an external static class to play and stop the music

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