A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Looping music properly

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    1

    Looping music properly

    Hi, I have a massive problem here, that sounds like it should be simple but I can't seem to figure it out, and even google isn't helping much. I just started using Flash today, and all I want to do is put a looping backing track for my animation.

    My animation is 12 frames long, and my music file is about 6 seconds, so this is the problem...I tried putting the music file into keyframe 1 on a new layer, and it plays another instance of the music when the animation loops. I also tried making the music layer the same length as the animation layer, but then the music loops at the same time is the animation.

    Is there any way to make the background music loop when its done, independently of the actual animation? its really driving me crazy. And don't be afraid to put it in the simplest way possible, I really don't know a lot about flash at all.

    Thanks!

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    yeah, that happens sometimes..

    what you COULD do is have the start of your animation blank and on the first blank keyframe enter this on the actions:
    stopAllSounds(); then when the animation loops it wont play another instance of the sound ontop of each other sound. it will stop all sounds before playing the sound which would be in frame 2 until the end of your animation.


    failing that..my advise would be to trim the length of the music to match the length of the animation. theres a great program called audacity that can do this.

  3. #3
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    Quote Originally Posted by Azrafox View Post
    Is there any way to make the background music loop when its done, independently of the actual animation?
    mark it as "event", not "stream" and enter some bigass number in loop counter (or maybe 0 means forever, I dont remembeR).
    I tried putting the music file into keyframe 1 on a new layer, and it plays another instance of the music when the animation loops.
    have your animation to span frames 2...N and never return to frame 1.
    who is this? a word of friendly advice: FFS stop using AS2

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