Helpful Information
 
 
Category: Flash
embed swf music/song

I would like to embed "swf" music/songs on my site and even if the visitor to my site did not install flashpayer on his/her PC, the visitor could still hear the music.
Could someone advise me on the code? Many thanks in advance.

Can't be done. Using a Flash file and having people view it without Flash installed would be like having a visitor open Microsoft Office without having Windows installed.

The visitor will need to have shockwave and/or Flashplayer plugins installed in their browsers. Most already do, and automatically update.

It shouldn't be a problem.

Thanks, Blizzard. Before I install flashplayer on my PC, I could view the flash with the following source code, so I reckon there is a similar source code for background music/song as well:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<TITLE>open-new.swf</TITLE>
</HEAD>
<BODY bgcolor="#ffffff">
<!-- URL's used in the movie -->
<!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="http://www.whisperaudio.com/02_banners/banner.swf" ALIGN="">
<PARAM NAME=movie VALUE="http://www.whisperaudio.com/02_banners/banner.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=LOOP VALUE="true"><PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://www.whisperaudio.com/02_banners/banner.swf" quality=high bgcolor=#ffffff
WIDTH="320" HEIGHT="240" NAME="http://www.whisperaudio.com/02_banners/banner.swf" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">

</EMBED>
</OBJECT>
</BODY>
</HTML>

Edit:
The above with the smiling face should be replaced with ": D" but without the space.

That was because your browser had shockwave player installed. this line:



TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">


Would have redirected you to the site to download the shockwave player if it wasn't.

Note that shockwave player and Flash player are 2 different animals :D

Pardon me if my query sounds >_<
swf music is associated with shockwave player or Flash player ?

Can a line be included for swf background music so that if the browser does not have the relevant player installed, it would redirect one to the site to download?

I tried out a code meant for wma file and found that it works :p

<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" autostart="true" loop="0" src="music.swf"></embed>

Congrats! Flash is more versitle than most people realize, and one of the main reasons I truly love the program.

Unlike most other languages and programs if you can think it, Flash can usually do it. Althought it might not always be pretty, it will work. I have found this out time and again.

Flash player, to answer your question, is usually associated with .swf files, where shockwave is reserved for DCR files.

Of course this will depend on your type of application, how you embed, and how much of that is truly Flash, or stand alone. :D










privacy (GDPR)