Advertise Here

Author Topic: Html/Java Logic Help  (Read 3041 times)

0 Members and 1 Guest are viewing this topic.

Offline Xunnamius

  • SMF For Free Newbie
  • *
  • Posts: 8
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 First Post
Html/Java Logic Help
« 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  ;D ), 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: [Select]
<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: [Select]
<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 »

Offline Celebrus

  • SMF For Free Hero
  • *
  • Posts: 941
    • View Profile
    • Vikhyat Korrapati

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Html/Java Logic Help
« 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.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5180 Views
Last post July 02, 2008, 01:16:07 pm
by Jessie
3 Replies
13960 Views
Last post July 01, 2008, 10:20:57 am
by guest4485
3 Replies
10870 Views
Last post November 10, 2008, 09:55:02 pm
by ImthEhAppYEmO
10 Replies
12876 Views
Last post January 09, 2010, 01:57:39 pm
by hell hound