how to play an audio file

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

how to play an audio file

Post by itsmani1 »

i want to play an audio file on some button or image click?
what could be the method?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Use Flash.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Moved to Client Side.


Why not just <embed>?
yourrussianlady
Forum Newbie
Posts: 5
Joined: Thu Dec 08, 2005 6:50 am

Post by yourrussianlady »

For start of video or a sound


<IMG DYNSRC="12.mpg" START="FILEOPEN" WIDTH="200" HEIGHT="250">

or

<embed src = "12.mpg" width = "400" height = "350" autostart = "true" loop = "False">
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Sami wrote:Why not just <embed>?
Because its not valid html, and as a result, causes WAI compliance problems.

(Object is the correct solution, but IE<7 doesn't support it. Groan).

There are a variety of solutions, most of which vary in their sneaky use of flash. Its the *only* area I really advocate the use of flash as a top-tier solution.
Post Reply