Click to See Complete Forum and Search --> : Audio playing problem


jamesx521
04-07-2007, 11:00 PM
This is my 2nd post... I didn't get anything the first time.

I have a Flash audio player that starts playing a song when the page opens. I have that Flash player on each page of a website. When I go to the website, the first song starts playing OK, because it is set to "auto" play. However, when I go to another page -- the Flash player starts auto-playing again from the beginning (because it is set to "auto" play again). I don't want to set it to pause, I basically want it to continue playing the original song, regardless of the clicking through the navigation of the site. What can I do? :confused: Thanks.

This is the JS in HTML page:

<script type="text/javascript">
var FO = { movie:"mp3player.swf",width:"240",height:"135",majorversion:"7",build:"0",bgcolor:"#FFFFFF",
flashvars:"file=playlist.xml&autostart=true&repeat=true&shuffle=false&lightcolor=0xFFFFCC&backcolor=0x9f9e88&frontcolor=0xFFFFFF&displayheight=0" };
UFO.create(FO,"player2");
</script>

hastx
04-07-2007, 11:37 PM
THe only way i have found to keep a song playing continuously is to use frames. the flash player is embedded in the navigation frame an when a visitor clicks on a link, the link targets the content frame via the javascript void() function embedded in the link.

Using the Void function the nav frame will never have to refresh, which will allow the song to continue playing.

jamesx521
04-08-2007, 07:25 PM
Would the void function aslo disable other Java Script code from Refreshing?

I am possibly thinking iFrames now, because I can't change the site to frames.

hastx
04-09-2007, 08:34 AM
No. it only affects the link. IFrame would work also...You could make your page look like it is not using frames by maiking the iframe take up the bulk of the page...as long as your flash player is not on a page that needs refreshing, it will suit your purpose.

There is a tutorial on Void here (http://www.tizag.com/javascriptT/javascriptvoid.php).

jamesx521
04-17-2007, 10:24 PM
:confused: I still don't get it. I created an <iframe> for the flash player, so for every page of the website the flash player is in the iframe.

Let's say I have Page 1 and Page 2 and I am making a link from page one to page two. The tutorial says, I should put the void function in my link, like this: href="javascript: void(0)" however, I need to have href="page2.html" so that I can go to page two. The idea is when I go to page two the flash player -- which is in the iframe -- not to refresh and start playing the same song from the beginning again... but I do want to see the content of page 2!