The Warring States of NPF  

Go Back   The Warring States of NPF > Social > Computers & Technology
User Name
Password
Mark Forums Read
FAQ Members List Calendar Search Today's Posts Join Chat

Reply
View First Unread View First Unread   Click to unhide all tags.Click to hide all tags.  
Thread Tools Display Modes
Unread 04-30-2010, 07:30 PM   #1
Nique
Niqo Niqo Nii~
 
Nique's Avatar
 
Join Date: Mar 2004
Posts: 6,240
Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years.
Default HTML, Java, CSS help needed

I'm trying to create a soundboard like so and am trying to do it without flash.

I'm hitting a wall with the JavaScript. You can see by the code below that I've gotten some test images to preform rollover effects just fine;

HTML
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

	<head>
		<LINK href="stylesheet.css" rel="stylesheet" type="text/css">
		<title>My Webpage</title>	
	</head>
	
	<body>

		<center>

			<table border="1">
				<tr>
					<td>	
						<a href="#" class="rollover1" 

title="Sound"><span class="displace">Sound</span></a>
					<td>
						<a href="#" class="rollover2" 

title="Sound"><span class="displace">Sound</span></a>
					</td>
				</tr>
				
				<tr>
					
					<td>
						<a href="#" class="rollover2" 

title="Sound"><span class="displace">Sound</span></a>
					</td>
					
					<td>
						<a href="#" class="rollover1" 

title="Sound"><span class="displace">Sound</span></a>
					</td>
				</tr>
			
			</table> 
		
		</center>
	
	</body>

</html>
CSS
Code:
/* stylesheet.css - a simple style sheet */


a.rollover1 {     
	display: block;     
	width: 100px;     
	height:100px;     
	text-decoration: none;     
	background: url("test-button.png");     
	} 

a.rollover1:active {     
	background-position: -100px 0;     
	} 

a.rollover2 {     
	display: block;     
	width: 100px;     
	height:100px;     
	text-decoration: none;     
	background: url("test-button2.png");     
	} 

a.rollover2:active {     
	background-position: -100px 0;     
	} 

.displace {     
	position: absolute;     
	left: -5000px;     
	}
But to get sounds to play when I click on those images, I'm trying to include something like this;

JavaScript
Code:
<script>
function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}
</script>

<embed src="sound.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">

<a href="#" onClick="EvalSound('sound1')">Click here to play sound</A>
I'm super novice esspecially with the JavaScript. When I try to incorporate the Java it doesn't seem to work. And, I mean, just so we're clear on exactly how novice I am, I'm still not 100% sure where the 'script' tags are supposed to go.

Help/ examples would be much appreciated.

EDIT: Edited per Fifthfiend's advice. Will post with results after my next attempt.
__________________
Quote:
Remember, I'm Niqo-Ni, and I love Niqo-you!

Last edited by Nique; 04-30-2010 at 08:31 PM.
Nique is offline Add to Nique's Reputation   Reply With Quote
Unread 04-30-2010, 08:26 PM   #2
Fifthfiend
for all seasons
 
Fifthfiend's Avatar
 
Join Date: Feb 2004
Posts: 19,409
Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare.
Send a message via AIM to Fifthfiend
Default

I think you want sound.wav, not sound, in your onClick action.

EDIT No wait sorry I think you want sound1, it's supposed to match the name from your embed.
__________________
check out my buttspresso

Last edited by Fifthfiend; 04-30-2010 at 08:30 PM.
Fifthfiend is offline Add to Fifthfiend's Reputation   Reply With Quote
Unread 04-30-2010, 08:37 PM   #3
Nique
Niqo Niqo Nii~
 
Nique's Avatar
 
Join Date: Mar 2004
Posts: 6,240
Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years.
Default

Hm. It is arranged like so...

Code:
<head>
		<LINK href="stylesheet.css" rel="stylesheet" type="text/css">
		<title>My Webpage</title>	
	</head>
	
	<body>
	
<script>
function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}
</script>

<embed src="sound.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">

<a href="#" onClick="EvalSound('sound1')">Click here to play sound</a> ...
But still no dice.

And yes my filepath is correct and yes I am actually using a file named 'sound.wav' that makes for reals noise. I'm using IE7 if that helps.
__________________
Quote:
Remember, I'm Niqo-Ni, and I love Niqo-you!
Nique is offline Add to Nique's Reputation   Reply With Quote
Unread 04-30-2010, 09:03 PM   #4
Fifthfiend
for all seasons
 
Fifthfiend's Avatar
 
Join Date: Feb 2004
Posts: 19,409
Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare.
Send a message via AIM to Fifthfiend
Default

Huh. It apparently works fine in Firefox / IE8 / Chrome so IDK. Does that link work for you?

EDIT: Does this? Maybe the problem isn't the javascript so much as whatever plugin you have/don't have installed?
__________________
check out my buttspresso

Last edited by Fifthfiend; 04-30-2010 at 09:45 PM.
Fifthfiend is offline Add to Fifthfiend's Reputation   Reply With Quote
Unread 04-30-2010, 09:58 PM   #5
Nique
Niqo Niqo Nii~
 
Nique's Avatar
 
Join Date: Mar 2004
Posts: 6,240
Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years.
Default

FFFFFFFFFFFFFFFFFuuuu...

Yeah that'd be it but I am checking it on another computer. Unfortunatly the fact that the OTHER computer doesn't have the right plugin means that all the computers that will be using it don't have it either.
__________________
Quote:
Remember, I'm Niqo-Ni, and I love Niqo-you!
Nique is offline Add to Nique's Reputation   Reply With Quote
Unread 04-30-2010, 10:02 PM   #6
Fifthfiend
for all seasons
 
Fifthfiend's Avatar
 
Join Date: Feb 2004
Posts: 19,409
Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare.
Send a message via AIM to Fifthfiend
Default

Do you have quicktime installed? That's what mine uses to play 'em.

But yeah if this is some sort of serious project or w/ev you probably shouldn't count on people having whatever dumb plugin.

Which I guess is why every media site uses Flash, it's the dumb plugin that everybody has!
__________________
check out my buttspresso

Last edited by Fifthfiend; 04-30-2010 at 10:06 PM.
Fifthfiend is offline Add to Fifthfiend's Reputation   Reply With Quote
Unread 04-30-2010, 10:08 PM   #7
Nique
Niqo Niqo Nii~
 
Nique's Avatar
 
Join Date: Mar 2004
Posts: 6,240
Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years.
Default

Yeah and basically any way to make this work that I have researched needs the plugin to play it right off the page... or else there is some insane magic way to do it in CSS.

Thanks for the help though! At least now I can stop wasting my time with USELESS JAVASCRIPT! GAH!
__________________
Quote:
Remember, I'm Niqo-Ni, and I love Niqo-you!
Nique is offline Add to Nique's Reputation   Reply With Quote
Unread 04-30-2010, 10:16 PM   #8
Fifthfiend
for all seasons
 
Fifthfiend's Avatar
 
Join Date: Feb 2004
Posts: 19,409
Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare.
Send a message via AIM to Fifthfiend
Default

I guess if you wanna stick to doing it in java/html could figure out how to set it up to detect whether people have X plugin and if they don't be like "HEY YOU DON'T HAVE X PLUGIN YOU GOTTA GO GET DAT OR THIS SITE WON'T DO SHIT"
__________________
check out my buttspresso
Fifthfiend is offline Add to Fifthfiend's Reputation   Reply With Quote
Unread 05-01-2010, 12:01 AM   #9
Nique
Niqo Niqo Nii~
 
Nique's Avatar
 
Join Date: Mar 2004
Posts: 6,240
Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years. Nique has apparently made an impact on one or two people over the years.
Default

Here's a sort of weird thing. Off your site, it works. But if I try to play it locally out of just 'My Documents' or whatever, it brings up the Active-X error and then won't play at all. Could it have to do with the file types I'm using? It's just a .wav I found from the OS so it should be a thang...
__________________
Quote:
Remember, I'm Niqo-Ni, and I love Niqo-you!
Nique is offline Add to Nique's Reputation   Reply With Quote
Unread 05-01-2010, 03:33 AM   #10
Fifthfiend
for all seasons
 
Fifthfiend's Avatar
 
Join Date: Feb 2004
Posts: 19,409
Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare. Fifthfiend has indicated, by your reading this, that they are now President and you have to fart gourmet mustard arugula into your Obamacare.
Send a message via AIM to Fifthfiend
Default

Quote:
Originally Posted by Nique View Post
Here's a sort of weird thing. Off your site, it works. But if I try to play it locally out of just 'My Documents' or whatever, it brings up the Active-X error and then won't play at all. Could it have to do with the file types I'm using? It's just a .wav I found from the OS so it should be a thang...
Do you have spaces in your filenames anywhere?

EDIT "My Documents" so lol, yeah. I bet that's what's fucking it up.
__________________
check out my buttspresso
Fifthfiend is offline Add to Fifthfiend's Reputation   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:36 AM.
The server time is now 02:36:33 PM.


Powered by: vBulletin Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.