SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 11:01:24 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: Html/Java Logic Help  (Read 491 times)
0 Members and 1 Guest are viewing this topic.
Xunnamius
SMF For Free Newbie
*
Offline Offline

Posts: 8


View Profile
« on: January 31, 2008, 11:30:06 am »

Forum Url: http://assassins.smfforfree4.com
I have a ProjectPlaylist account, and I have one playing on the bottom of my forum.

Problem is, I have AutoPlay on - and if more than one forum page is opened, the music plays over itself, forcing people to shut off their speakers.

To work around this, I tried to make it it so the autoplay loads on the portal page (home page), and on any other page the no autoplay version would load.

With my limited knowledge of Java and HTML (still learning, not there yet  Grin ), I tried to create a If/Else argument going a little like this:
Quote
If (at portal page) load AutoPlay version, Else, load noAutoPlay version

I got the different version of the player (autoplay & no autoplay) down, but the structure of the If/Else for HTML and Java I can't get right (ie: getting the current page/browser URL).

The Autoplay Version:
Code:
<div style="text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:450px;">
<br><p><font size=0.5>The Assassins Guild - Public Music Box! (Auto)</p>
<embed style="width:435px; visibility:visible; height:270px;" allowScriptAccess="never" src="http://www.musicplaylist.net/mc/mp3player-othersite.swf?config=http://www.musicplaylist.net/mc/config/config_red_shuffle.xml&mywidth=435&myheight=270&playlist_url=http://www.musicplaylist.net/loadplaylist.php?playlist=24518609" menu="false" quality="high" width="435" height="270" name="mp3player" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" border="0"/><br><p>Want to add your favorite song? Go ahead, its an open music box ^_^</p><p><a href="http://www.playlist.com/user?set=yes" target="_blank">Click Here to add your music!</a></p><p><font color=red>Username:</font> TheAssassinsGuild</p><p><font color=red>Password:</font> domoassassins</font></p></div>

The No Autoplay Version:
Code:
<div style="text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:450px;">
<br><p><font size=0.5>The Assassins Guild - Public Music Box! (Manual)</p>
<embed style="width:435px; visibility:visible; height:270px;" allowScriptAccess="never" src="http://www.profileplaylist.net/mc/mp3player-othersite.swf?config=http://www.profileplaylist.net/mc/config/config_red_noautostart_shuffle.xml&mywidth=435&myheight=270&playlist_url=http://www.profileplaylist.net/loadplaylist.php?playlist=24518609" menu="false" quality="high" width="435" height="270" name="mp3player" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" border="0"/><br><p>Want to add your favorite song? Go ahead, its an open music box ^_^</p><p><a href="http://www.playlist.com/user?set=yes" target="_blank">Click Here to add your music!</a></p><p><font color=red>Username:</font> TheAssassinsGuild</p><p><font color=red>Password:</font> domoassassins</font></p></div>

I need yer help once again!
« Last Edit: January 31, 2008, 11:39:16 am by Xunnamius » Logged
Celebrus
SMF For Free Hero
*
Online Online

Posts: 758


Previously known as Omikron


View Profile WWW
« Reply #1 on: February 01, 2008, 03:47:07 am »

You should be able to set a cookie that tells you that the music is playing and then include the code only if the cookie tells you the thing is running.

Look up javascript cookies.
Logged



Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.652 seconds with 17 queries.