Jump to content

Archived

This topic is now archived and is closed to further replies.

Orionsbelter

Play Sound When clicking an Image

Recommended Posts

I need some php coding for playing click.wav with i click the sound.jpg images. can anyone show me how to do it? thanks

Share this post


Link to post
Share on other sites

No it wouldn't

 

Uh, yeah, it would.  PHP doesn't do client-side events.

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'

width='2' height='0'>

</embed>

 

i found that ERMMMMM thats called PHP!!!!

Share this post


Link to post
Share on other sites

Nope, got that wrong mate ::) That's HTML.

 

Not only that, but that audio file will start automatically when the page is viewed, not when an image is clicked.

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'

width='2' height='0'>

</embed>

 

i found that ERMMMMM thats called PHP!!!!

 

That is pretty damn awesome.

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'

width='2' height='0'>

</embed>

 

i found that ERMMMMM thats called PHP!!!!

 

That is pretty damn awesome.

 

*snicker*

Share this post


Link to post
Share on other sites

width='2' height='0'>

 

i found that ERMMMMM thats called PHP!!!!

 

wtf, this kid needs more than just PHP help...

Share this post


Link to post
Share on other sites

In all seriousness, PHP allows one to switch between scripting and outputting HTML in the same file.  Example:

 

<?php
   $title = "testing";
?>

<html>
<head>
   <title><?php echo $title; ?></title>
</head>

<body>
   Wow, look, I'm normal text in an HTML document!
</body>
</html>

 

The colored bits are PHP.  The rest is HTML.  This file would be saved as something.php, but that doesn't change the fact that the black-and-white bits are HTML.

Share this post


Link to post
Share on other sites

comon kids... be nice...

 

and yes it is javascript :-)

 

<scr ipt>
function playSound(id){

if(document.embeds) document.embeds["sound"+id].play();

}
</scr ipt>

<embed SRC="beep.wav" HIDDEN="TRUE" AUTOSTART="false" name="sound1" loop="false"></embed>

<a onclick="javascript:playSound('1');">play</a>

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'

width='2' height='0'>

</embed>

 

i found that ERMMMMM thats called PHP!!!!

 

That is pretty damn awesome.

 

That made my day.

Share this post


Link to post
Share on other sites

it makes my day that the user isnt on their first post to which to me indicates they have done some degree of coding in the past

Share this post


Link to post
Share on other sites
it makes my day that the user isnt on their first post to which to me indicates they have done some degree of coding in the past

 

I know right, 150 posts and he doesn't know the difference between php and js...

 

 

Dibs on the signature.

 

That's just too funny, I'm glad I was involved in this thread.

 

On a more serious note, blmg911, if you need help you have to start attempting these tasks on your own.  Like the previous posts visit php.net, tizag.com, there are thousands that teach you what you need to know piece by piece and if you need help we'll still be here....

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>

 

Maybe the code he originally saw was this....

 

<?php
echo "<embed src='.wav' autostart='true' loop='false' width='2' height='0'></embed>";
?>

Lmfao

Share this post


Link to post
Share on other sites

<embed src='.wav' autostart='true' loop='false'

width='2' height='0'>

</embed>

 

i found that ERMMMMM thats called PHP!!!!

[blmg911 Member  Posts: 150]

 

Quick, let's find his other posts  :D

Share this post


Link to post
Share on other sites

When you are done with the sound there is another cool thing to do, you don't want people to steal your work, so ...

If someone right-clicks the site to steal images, show that system error with loud "DING !" and says "Protected content".

 

24.gif I was mean, I know.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.