Pet Medications

Easy Background Music for Elements, Lightroom, and Bridge Flash galleries

We’ve had several requests for an easier way to add background music to the Flash galleries without having to know how to author Flash. This could have been done in such a way that an “add music” option appeared in the application UI’s, but that would take more time than I have at the moment (as I’d need to do three variations on that for the different app’s gallerymaker implementations). So I’ve put together a quick and dirty solution (albeit requires you to edit the XML -but that is easy!).

Basically it is a flash movie (bgmusic.swf) that you can insert into your exported gallery as a “background image” (though there is nothing “visible” in this movie) and which plays any mp3 file that you want.

Here’s how to do that in four easy steps:
1. right click on this link and choose “save link as” to save the bgmusic.swf to your hard drive in the “resources” folder of your Lightroom Flash gallery.

2. open the “style.xml” file found inside the “styles” folder there in that same resources folder with your favorite text editor

3. find the line of text that looks like this: <backgroundbgimg alpha=”100.00″ src=”"/> - about 2/3 of the way down (line 73 in the Lightroom version) and add the path to the bgmusic.swf into that tag. It should then look like this: <backgroundbgimg alpha=”0.00″ src=”resources\bgmusic.swf”/>
(Elements 5 users should be aware that the relative paths in their galleries are “hard coded” (via the baseref flashvar) to look in the “resources” folder, so it will not work if you include that folder name in the path. So your tweak to the style file would look like this: <backgroundBgImg alpha=”0″ src=”bgmusic.swf” /> )

4. take your background music clip (must be in mp3 format) and copy it into the resources folder as well, and rename it “bgmusic.mp3″

that’s it! Here’s a sample gallery that uses this approach.

Sound that automatically plays in websites is appropriate in some circumstances, and terribly annoying in others. This can be particularly true when you don’t offer volume controls or a mute button (which this movie does not have). So please be thoughtful about where and when to use this. When I have more time, I’ll make one with at least a mute button and post it.

Have fun!

19 Responses to “Easy Background Music for Elements, Lightroom, and Bridge Flash galleries”

  1. Sean McCormack Says:

    Thanks Micah. Hopefully you’ll have time for a mute button soon!

  2. Administrator Says:

    Yea, maybe next week. Have a 1.0 app to ship this week.
    -Micah

  3. Roger Walton Says:

    Thanks for this great tip! Now all I need is a tip for adding a “please wait” while the lightroom gallery opens from my own page.

  4. Administrator Says:

    Yea, load time is an issue to consider. It helps to compress your MP3 a bit more than the standard “high quality” compression on most MP3’s before adding it to a gallery. FYI, the bgmusic swf I made forces the mp3 to completely load before it starts playing.

    I could have alternatively had it “stream” (or pre-buffered part of it first and then stream - or more accurately progressive download) but that would likely result in sound hiccups depending on the size of the gallery, connection speed etc as the images download in parallel. Handling that synchronized loading more elegently would require a streaming server and/or sound loading managmenet code in gallery.swf itself. The source code for the gallery.swf as been open sourced by Adobe, so someone could do that if they wanted to…(or hire a company like Bluefire to do it)

  5. Jens Says:

    Hi,

    just tried it right you said - but no sound appeared when I started it in the browser directly from the harddisk.

    What could be the reason, if the format and the name of the mp3 is right, the swf is in the resources as well and the style is edited like you wrote….

    Thanks Jens

  6. Jens Says:

    ehm… no idea what me problem could be with the not starting sound?

  7. Administrator Says:

    Sorry Jens, no idea. It definitely works for others though, so keep troubleshooting

  8. Jens Says:

    If you want i send you my style xml…. no idea.

  9. Jens Says:

    Well - the code is like you said, the mp3 works fine, the swf too… but the music won´t start, when I make a check by clicking the index.html to open the galery…

  10. Jens Says:

    Well - if you want delete the messages above…

    Up at website I wrote the link to the galerie where normally music should start… you can have a look at the style.xml as well as on the rest of data by your browser. All names like you told.

    Yours Jens

    Have fun watching the galerie if you want (it contains Pink, Simon Webbe and more)

  11. Administrator Says:

    Jens,
    I’ve looked at your gallery (nice by the way) but could not see where the problem is. I’m guessing it is related to file paths. Try this: add anonther folder inside “resources” and name it “resources” also, and put a copy of the mp3 file in there. If that does not work download this file http://www.blufire.tv/blog/FlashGalleries/music_samplegallery/troubleshooter/bgmusic.swf

    It is a troubleshooter version of bgmusic.swf. If you swap it into your build, it will show you wether the bgmusic.swf file is loading correctly, and whether it loading the mp3

  12. salem Says:

    I have followed the instructions to add an audio to a Flash in Lightroom v1.1 I’m on a MacPro Dual 10.4.10 - I’ve placed the mpeg-3 file into the resources folder, but when I play the html the audio file is running at high speed instead of normal speed. Any thoughts way this is happening? Thanks….. SK

  13. Administrator Says:

    Salem,
    hmmm, that is strange. No idea why that would happen. You might try a different mp3 to see if it works. If so, you’ll know it is a problem with the original mp3 file.

  14. rimma Says:

    I have the same problem Jen does! I’ve tried everything suggested above but my music isn’t loading

  15. rimma Says:

    Nevermind, I got it!

  16. One12Images Says:

    Thanks It worked for me. I did everything you stated and it work for my updated slideshow gallery.

  17. harvi Says:

    fantastic it definately works. a probs at first - comma in wrong place. but solved now

  18. Terry Says:

    This worked beautifully!! Did you ever code that mute button you mentioned?

  19. Guy Huntley Says:

    The link to the troubleshooter is missing an “e”
    Should be:
    http://www.bluefire.tv/blog/FlashGalleries/music_samplegallery/troubleshooter/bgmusic.swf