Javascript + Swfobject + Dropdownlist + Play audio

pletcherzhq

New Member
I am new to this forum and would like to ask a question if any friend can help.I got swfobject.js + flash player + dropdownlist on my page and i want to play music by changing the song name in dropdownlist. So far the code i have is not working (see below). Please can any friend can help me that how can i achive this.\[code\]<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>FlashMP3</title><script type="text/javascript" src="http://stackoverflow.com/questions/12577350/Contents/swfobject.js"></script></head><body><form id="form1" runat="server"><asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource1" DataTextField="Songs" DataValueField="Songs" Height="20px" Width="250px"></asp:DropDownList><asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/DataDB.mdb" SelectCommand="SELECT [Songs] FROM [Table1]"></asp:AccessDataSource><br /><script type="text/javascript">var flashvars = false;var params = {menu: "false", flashvars: "config=Contents/flpconfig.txt&mp3=Contents/" + document.getElementById("DropDownList1").value + ".mp3"};var attributes = false;swfobject.embedSWF("Contents/player_mp3_maxi.swf", "myAlternativeContent2", "250", "20", "9.0.0", false, flashvars, params, attributes);</script><div id="myAlternativeContent2" style="position: relative; width: 250px; height: 20px; "></div></form></body></html>\[/code\]
 
Back
Top