Music - Change Flash Var. with HTML, I need help changing a Flash variable with html. |
Music - Change Flash Var. with HTML, I need help changing a Flash variable with html. |
Nerd |
May 18 2007, 11:10 PM
Post
#1
|
Group: Members Posts: 1 Joined: 18-May 07 Member No.: 2,857 |
Here is my problem I have two frames one is the music player page and the other is the "remote" and I need the "remote" to change the music players playlist url on the music player page, but it isn't that easy since it is flash. The reason why I have to do this is so I don't have to make a html page for every single album. I will give you attachments and the code. PLEASE HELP ME!!!!
music player code: CODE <script language="JavaScript"> <!-- document.writeln("<object name=\"Player\" id=\"Player\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"never\" allowNetworking=\"internal\" height=\"290\" width=\"270\" style=\"filter:none;\" align=\"top\" data=\"http://media.albumsonmyspace.com/Playlists/player.swf\">"); document.writeln(" <param name=\"allowScriptAccess\" value=\"never\" />"); document.writeln(" <param name=\"allowNetworking\" value=\"internal\" />"); document.writeln(" <param name=\"movie\" value=\"http://media.albumsonmyspace.com/Playlists/player.swf\" />"); document.writeln(" <param name=\"menu\" value=\"false\" />"); document.writeln(" <param name=\"quality\" value=\"high\" />"); document.writeln(" <param name=\"flashvars\" value=\"playList=http://media.albumsonmyspace.com/Playlists/Rock/All%20American%20Rejects.xml&ShowPlaylist=1&ShowEQ=1&firstTrack=1&initVol=100\" />"); document.writeln(" <param name=\"wmode\" value=\"transparent\" />"); document.writeln("</object>"); //--> </script> page with the Frames: CODE <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”> <HTML> <HEAD><META HTTP-EQUIV=”Content-Type” CONTENT=”text/html; charset=UTF-8”> <TITLE>We are a Hacking Civilization</TITLE> </HEAD> <FRAMESET rows="*" cols="172,*" id="fscroll" name="fscroll"> <FRAME src="Remote.html" noresize name="left" id="left" > <FRAME src="Player.html" noresize name="right" id="right"> </FRAMESET> <noframes></noframes> <BODY> <P>Your browser does not support frames. Please download the latest version of your current browser, or get a new one, to view this site.</P> </HTML> Remote: CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>We are a Hacking Civilization</title> <script type="text/javascript"> var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off) var collapseprevious="no" //Collapse previously open content when opening present? (yes/no) if (document.getElementById){ document.write('<style type="text/css">') document.write('.switchcontent{display:none;}') document.write('</style>') } function getElementbyClass(classname){ ccollect=new Array() var inc=0 var alltags=document.all? document.all : document.getElementsByTagName("*") for (i=0; i<alltags.length; i++){ if (alltags[i].className==classname) ccollect[inc++]=alltags[i] } } function contractcontent(omit){ var inc=0 while (ccollect[inc]){ if (ccollect[inc].id!=omit) ccollect[inc].style.display="none" inc++ } } function expandcontent(cid){ if (typeof ccollect!="undefined"){ if (collapseprevious=="yes") contractcontent(cid) document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none" } } function revivecontent(){ contractcontent("omitnothing") selectedItem=getselectedItem() selectedComponents=selectedItem.split("|") for (i=0; i<selectedComponents.length-1; i++) document.getElementById(selectedComponents[i]).style.display="block" } function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function getselectedItem(){ if (get_cookie(window.location.pathname) != ""){ selectedItem=get_cookie(window.location.pathname) return selectedItem } else return "" } function saveswitchstate(){ var inc=0, selectedItem="" while (ccollect[inc]){ if (ccollect[inc].style.display=="block") selectedItem+=ccollect[inc].id+"|" inc++ } document.cookie=window.location.pathname+"="+selectedItem } function do_onload(){ uniqueidn=window.location.pathname+"firsttimeload" getElementbyClass("switchcontent") if (enablepersist=="on" && typeof ccollect!="undefined"){ document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load if (!firsttimeload) revivecontent() } } if (window.addEventListener) window.addEventListener("load", do_onload, false) else if (window.attachEvent) window.attachEvent("onload", do_onload) else if (document.getElementById) window.onload=do_onload if (enablepersist=="on" && document.getElementById) window.onunload=saveswitchstate </script> <style type="text/css"> <!-- .style1 {font-size: 12px} --> </style> </head> <body> <h3 class="style1" style="cursor:hand; cursor:pointer" onclick="expandcontent('sc1')">R&B</h3> <div id="sc1" class="switchcontent"> <div align="center"> <p><u><strong>Akon</strong></u><br /> <img src="http://albumsonmyspace.com/Category/RB/Akon/akon.jpg" alt="Akon" width="60" height="60" border="0" scr= "http://albumsonmyspace.com/Category/RB/Akon/akon.jpg"/></a></p> <p><u><strong>Cassie</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Cassie/Cassie.jpg" alt="cassie" height="60" width="60"></a></p> <p><u><strong>Chamillionaire</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Chamillionaire/chamillionaire.jpg" height="60" width="60"></p> <p><u><strong>eminem</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/eminem/eminem.jpg" height="60" width="60"></p> <p><u><strong>Fat Joe</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Fat%20Joe/Fat%20Joe.jpg" height="90" width="64"></p> <p><u><strong>Fergie</strong></u><br> <img title="Fergie - The Dutchess" src="http://albumsonmyspace.com/Category/RB/Fergie/Fergie.jpg" width="62" height="91"></p> <p><u><strong>Gwen Stefani</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Gwen%20Stefani/Gwen%20Stefani.jpg" height="60" width="70"></p> <p><u><strong>Ice Cube</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Ice%20Cube/Ice%20Cube.jpg" height="60" width="70"></p> <p><u><strong>Jay - Z</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Jay%20-%20Z/Jay%20-%20Z.jpg" height="70" width="60"></p> <p><u><strong>JoJo</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/JoJo/JoJo.jpg" height="60" width="60"></p> <p><u><strong>Just Jack</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Just%20Jack/JustJack.jpg" height="60" width="60"></p> <p><u><strong>Justin Timberlake</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Justin%20Timberlake/Justin%20Timberlake.jpg" height="60" width="60"></p> <p><u><strong>Lil Wayne</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Lil%20Wayne/lil_wayne.jpg" height="60" width="60"></p> <p><u><strong>Ne-Yo</strong></u><br> <img src="http://albumsonmyspace.com/Category/RB/Ne-Yo/neyo.jpg" height="60" width="60"></p> </div> </div> <h3 class="style1" style="cursor:hand; cursor:pointer" onclick="expandcontent('sc2')">Rock</h3> <div id="sc2" class="switchcontent"> </div> <h3 class="style1" style="cursor:hand; cursor:pointer" onclick="expandcontent('sc3')">POP</h3> <div id="sc3" class="switchcontent"> </div> <h3 class="style1" style="cursor:hand; cursor:pointer" onclick="expandcontent('sc4')">Dance</h3> <div id="sc4" class="switchcontent"> </div> </body> </html> Music Player Page: CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>We are a Hacking Civilization</title> <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; background-image: url(http://i99.photobucket.com/albums/l293/Nerd10101/HackthePlanet.jpg); background-position:100% 0%; background-repeat:no-repeat; background-attachment:fixed; } .style1 { font-size: 36px; font-family: Verdana, Arial, Helvetica, sans-serif; } a:link { color: #FFFFFF; } a:visited { color: #66FFFF; } a:hover { color: #FF0000; } a:active { color: #66FF00; } .style2 {font-weight: bold} .style4 { color: #0000FF; font-size: 18px; } .style5 { font-size: 14px; font-family: Arial, Helvetica, sans-serif; } .style6 {font-family: Arial, Helvetica, sans-serif} --> </style></head> <body> <center> <script src="http://www.hack-the-planet.150m.com/Date.js"></script> <script src="http://www.hack-the-planet.150m.com/Links.js"></script> <script language="JavaScript"> <!-- document.writeln("<object name=\"Player\" id=\"Player\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"never\" allowNetworking=\"internal\" height=\"290\" width=\"270\" style=\"filter:none;\" align=\"top\" data=\"http://media.albumsonmyspace.com/Playlists/player.swf\">"); document.writeln(" <param name=\"allowScriptAccess\" value=\"never\" />"); document.writeln(" <param name=\"allowNetworking\" value=\"internal\" />"); document.writeln(" <param name=\"movie\" value=\"http://media.albumsonmyspace.com/Playlists/player.swf\" />"); document.writeln(" <param name=\"menu\" value=\"false\" />"); document.writeln(" <param name=\"quality\" value=\"high\" />"); document.writeln(" <param name=\"flashvars\" value=\"playList=http://media.albumsonmyspace.com/Playlists/Rock/All%20American%20Rejects.xml&ShowPlaylist=1&ShowEQ=1&firstTrack=1&initVol=100\" />"); document.writeln(" <param name=\"wmode\" value=\"transparent\" />"); document.writeln("</object>"); //--> </script> </center> </body> </html> The Attachments: Frames Page: Music.html ( 567bytes ) Number of downloads: 1579 Music Player Page: Player.html ( 2.22k ) Number of downloads: 1610 Remote Page: Remote.html ( 6.18k ) Number of downloads: 9081 |
Lo-Fi Version | Time is now: 19th April 2024 - 06:53 AM |