Need help editing code

Discussion in 'JavaScript' started by solboy, Aug 5, 2009.

  1. #1
    Hi,

    I am sure this is simple but I really don't know how to make it work.
    I'm trying to get the below flash mp3 player code to play a live radio stream instead of this mp3 file that came with it by default.

    Here is the rtmp address and stream name for the live radio:

    RTMP Address: rtmp://fli002.dc1.hwcdn.net/w6s8g8x8/_definst_
    Stream Name: fli/22693-JAMZ


    
    
    
    
    <html>
    	<head>
    		<title>Simple Flash Mp3 Player</title>
    		
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <script type="text/javascript" src="js/swfobject.js"></script>
    	
    		<script type="text/javascript">
    		
    			var stageW = 560;
    			var stageH = 300; 
    			var cacheBuster = Date.parse(new Date());
    			
    			var flashvars = {};
    			var params = {};
    			
    			params.bgcolor = "#ffffff";
    			params.allowfullscreen = "true";
    			
    			
    			flashvars.stageW = stageW;
    			flashvars.stageH = stageH;
    			
    			flashvars.pathToFiles = "/";
    			
    			flashvars.artistName = "Busta Rhymes";
    			flashvars.songName = "Break Ya Neck";
    			flashvars.songURL = "songs/song.mp3";
    			
    			flashvars.settingsPath = "xml/settings.xml";
    			flashvars.xmlPath = "xml/mp3_player.xml";
     
    			
    			swfobject.embedSWF("preview.swf?t="+cacheBuster, "myContent", stageW, stageH, "9.0.124", "js/expressInstall.swf", flashvars, params);
    			
    		</script>
    			
    	</head>
     
     
    	<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="yes">
    	
    		<table width="100%"  height="100%">
    		  <tr>
    			<td align="center">
    			
    				<div id="myContent">
    					<p>
    						<a href="http://www.adobe.com/go/getflashplayer">
    							<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>
    						</a>
    					</p>	
    				</div>
    			
    			</td>
    		  </tr>
    		</table>
    	
    	</body>
    </html>
    
    Code (markup):

    Thanks.
     
    solboy, Aug 5, 2009 IP
  2. runspace

    runspace Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am not sure. What is the page (error) that is currently loading? I am guessing you may have to modify flashvars.settingPath or swfobject.embedSWF("[modify this]")
     
    runspace, Aug 5, 2009 IP