ged12345 Posted January 2, 2009 Share Posted January 2, 2009 Hey there, My question is this - I have a free flash player loaded within my html code - but the way my pages work is through php. I have a header.php file, an indexmain.php file and a footer.php file within each of my index.php files for each part of the site. The mp3 player is loaded in the header.php file. Everytime I load a page other than the main page, the flash player is reloaded, the song stops and then starts again. I want the mp3 player to loop the song continually, throughout the website. The javascript is: <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("<?php $siteDomain; ?>/flashmp3player/ep_player.swf", "ep_player", "301", "16", "9", "#FFFFFF"); so.addVariable("skin", "<?php $siteDomain; ?>/flashmp3player/skins/micro_player/skin.xml"); so.addVariable("playlist", "<?php $siteDomain; ?>/flashmp3player/playlist.xml"); so.addVariable("autoplay", "true"); so.addVariable("shuffle", "false"); so.addVariable("repeat", "true"); so.addVariable("buffertime", "1"); so.addVariable("key", "YOURUNIQUEKEY"); so.addParam("allowscriptaccess", "always"); so.write("flashcontent"); // ]]> </script> It works fine otherwise - is there someway to pass the javascript variable assigned above for the mp3 player to each new page, so I can redisplay the mp3 player but not restart the song? Or is there a way to keep my top menu (the header section) without reloading it each time, and just reload indexmain.php, the middle section? Thanks, ged12345 Link to comment https://forums.phpfreaks.com/topic/139174-keeping-a-flash-player-playing-music-in-php/ Share on other sites More sharing options...
Solar Posted January 2, 2009 Share Posted January 2, 2009 The header.php is going to reload everytime someone clicks a new link or refreshes the page. The only ways I could think of you have the music play is on an acutal page, or in a popup window. Hopefully someone who isn't tired like me will think of a way. Link to comment https://forums.phpfreaks.com/topic/139174-keeping-a-flash-player-playing-music-in-php/#findComment-727931 Share on other sites More sharing options...
Altec Posted January 2, 2009 Share Posted January 2, 2009 Switch to Ajax. Link to comment https://forums.phpfreaks.com/topic/139174-keeping-a-flash-player-playing-music-in-php/#findComment-727932 Share on other sites More sharing options...
Solar Posted January 2, 2009 Share Posted January 2, 2009 Or now that I think of it, the only possible way that your music will still play is frames.. Have your javascript inside a file, and it will be on the top frame, then your website can be below in the mainFrame. Therefor, when someone clicks a link or explore your website, the topFrame won't refresh <frameset rows="89,*" cols="*" framespacing="0" frameborder="no" border="0"> <frame src="The URL of your music player / or the script in a php file" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> <frame src="The whole entire site="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> Link to comment https://forums.phpfreaks.com/topic/139174-keeping-a-flash-player-playing-music-in-php/#findComment-727935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.