Help - Search - Members - Calendar
Full Version: How do i add background music to a swf?
Hydrogenaudio Forums > Misc. > Off-Topic
kwanbis
i have this code in a page:

<html>
<body>
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width=100% height=100%>
<param name=movie value="christmasballs.swf">
<param name=quality value=high>
<param name=wmode value=transparent>
<param name="SCALE" value="noborder">
<embed src="christmasballs.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width=100% height=100% scale="noborder">
</embed>
</object>
</center>
</body>
</html>

i want to upload some christmas music and that when you see the page, you hear the music. how can i? (it could be a mid, mp3, whatever is best)
kwanbis
i have tried

<EMBED SRC="music.mid" AUTOSTART="TRUE" HIDDEN="TRUE" LOOP="TRUE"> <NOEMBED> <BGSOUND SRC="music.mid" LOOP="INFINITE"> </NOEMBED>

which works under IE, but Firefox asks for a missing plugin, that it can't find.
rjamorim
Recent browsers don't come with a MIDI plugin. One option would be asking people to download and install Midplug.

A better option would be creating a music-only SWF, with no movie or imagery. Better because the flash plugin comes preinstalled in several browsers, and because it can play both MID and MP3. You can also create custom interfaces for playback (there are even templates around) and what not.
kwanbis
thanks. i would try to add to the SWF.
kwanbis
i was told i could use:

<object data="music.mid" type="application/x-mplayer2" width="0" height="0">
<param name="src" value="music.mid">
<param name="autostart" value="1">
<param name="playcount" value="infinite">
</object>

and it did, but it just works on my local HD, i tried changing

<object data="http://www.adriyjavi.com.ar/music.mid" type="application/x-mplayer2" width="0" height="0">
<param name="src" value="http://www.adriyjavi.com.ar/music.mid">
<param name="autostart" value="1">
<param name="playcount" value="infinite">
</object>

but still no luck, any idea?
kwanbis
never mind, is ok.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.