Results 1 to 5 of 5

Thread: Background music starts another one when movie clip replays.

  1. #1
    Join Date
    Aug 2008
    Location
    San Diego
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Background music starts another one when movie clip replays.

    I have just tried to attach a background sound with on/off button to my movie clip at frame 1 of the main Timeline.

    Flash Movie: the movie will keep on replaying until a viewer clicks a button.
    (frame 1 to 7)


    Problem: the background sound plays again on top of the ancient one. And as the movie starts again, one more piece will be played, and so on.


    I've tried to use different approach with action script but no luck, Please help.

  2. #2
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    are you killing the instance of the music at the end of your swf? Do you want the music to be looping with the swf or keep playing as normal with just the movie looping? What exactly are you trying to get it to do?

  3. #3
    Join Date
    Aug 2008
    Location
    San Diego
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I just want the music to keep on looping as the movie keep on replaying.

    The problem is, when the timeline goes back to frame 1 as the movie re plays
    the music plays another fresh one from the start on top of the one that is currently playing from the first time its was loaded.

    What I wanted is for the music to just be looping continuosly.

  4. #4
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    have you tried putting your movie inside a movie clip and then establishing the music on frame 1 of the main timeline. The movie clip will loop and the music will just continue to play. you could then set a timer that counts down till the length of the song. when the timer finishes run a function that replays the song and restarts the timer.

    *edit:

    just looked through the live docs for AS3 for the play function there is a loop property that you can set.
    play(startTime:Number = 0, loops:int = 0, sndTransform:SoundTransform = null):SoundChannel
    Generates a new SoundChannel object to play back the sound.
    here's the link to the live docs just look up sound for more info.
    http://livedocs.adobe.com/flash/9.0/...riptLangRefV3/
    Last edited by punstc; 09-19-2008 at 03:46 AM.

  5. The Following User Says Thank You to punstc For This Useful Post:

    Mickey Flores (09-19-2008)

  6. #5
    Join Date
    Aug 2008
    Location
    San Diego
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I just figured out whats causing all the annoying sound repeatitions.

    it's not with the action script, it's with the sync! plain and simple solution took me 2 days. It's suppose to be set to "start" and NOT "event" and loop however many you want I set mine to "999".

    Well, thanks anyways for your help buddy, if it wouldn't for your response I would've already gave up on this thing.

    Thanks again

Bookmarks

Posting Permissions

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