Play MP3 Files Repeatedly

Aug 8, 2011

I am trying to learn JavaScript, I am creating a test page like a Learning page for children, where a child selects "Apple" and then selects repeat 3 times or times etc and the it plays what ever the user selected that many times, the user can even select "Apple", "Ant", "America" and select repeat any number of times (say 2 times each) and the media player will play like this "Apple", "Apple", "Ant", "Ant", "America", "America". Now I downloaded all these from different sites in mp3 format. How can I make the program to do what I want to do as said above, simple code. for i IN (all selected)

repeate (times user selected);
end loop;

View 1 Replies


ADVERTISEMENT

Play WAV Files From An Array?

Mar 28, 2011

What I need to do is load wav files into an array and simply have these play from the array onto a page when it loads. I have an image slide show and I want to have a sound effect play over it and then when the image changes another wav will play but first just want to have say 5 wav files play in order from the array.

I have the following

<script language="javascript" type="text/javascript">
var aySound = new Array();
aySound[0] = "1.wav";
aySound[1] = "2.wav";

View 3 Replies View Related

How Can I Play Midi And/or Audio Files?

Mar 24, 2006

How can I play midi and/or audio files using JavaScript?
I'm hoping there are some calls/APIs I can use that I am unaware of. My
JavaScript book from O'Reilly seems rather lacking in this area.

I'm looking for something like:

playMidiNote(pitch, duration);
playSoundFile(soundFileURL);

View 20 Replies View Related

JQuery :: [jme] JMediaelement Could Not Play These MOV Files?

Aug 30, 2010

[URL]jMediaelement could not play these MOVs.

View 1 Replies View Related

Play - Pause Button - Play A Constant Loop Of Audio On My Site That Autoplays

Jul 22, 2011

To javascript and have succeeded in getting this code:

Code:

To play a constant loop of audio on my site that autoplays (which i know, typically people hate... but, i'm doing it anyways on this site).

How to add one button in my html body that is CSS style-able that will both pause and then when clicked again resume playing the audio?

View 1 Replies View Related

Using An Array Repeatedly In Form?

Dec 14, 2010

I am new to JavaScript and self taught, so please bear with any terminology I use incorrectly. I have an array defined. I am trying to access this array multiple times (10) in the HTML. It worked on the first drop down, but when I added the next one it errored. Not sure if what I am trying to do is possible or if I am going about this the right way. Below is the code:

Code:
var Engagements = [];
Engagements[0] = new Option("","");
Engagements[1] = new Option("Asset Management","Asset Management");
Engagements[2] = new Option("Autoclave","Autoclave");

[Code]...

View 5 Replies View Related

Modifying Webpage Repeatedly To Add Features?

May 3, 2009

All semester, I have been working on a single web page, modifying it repeatedly to add features (using CSS). This last assignment involves javascript, something we've just barely touched on. I can't seem to figure out where exactly the event handler should be placed. No matter where I move it, it alters the way the page displays. In the right column, there are descriptions of 2 musicians, each includes a header, paragraph, and a thumbnail (that links to a larger image) on the far right side, next to the text.

I need to add this
<a href="#" onmouseover=
"alert( 'Concerts sell out quickly so act fast!');">Melanie Morris entertains with her melodic folk style.</a>
to this
<h3>January</h3>
<a href="melanie.jpg"><img src="melaniethumb.jpg" alt="Melanie Morris" width="100" height="97" align="right" border="0" hspace="150" /></a>
<p class="content">Melanie Morris entertains<br />
with her melodic folk style.<br />
Check out the podcast!<br />
CDs are now available.
</p>

The problem is, the book doesn't explain where to add it or have any examples of using onmouseover in this particular way, so I've spent forever trying to figure it out. In some places, it makes the sentence shows up twice. In others, it completely moves the picture out of position and/or extends the "Melanie Morris entertains with her melodic folk style" all the way across the page (thus, pushing the picture down). I initially had a very hard time making this page layout work (specifically, getting the images to show up in the right place).

The best I am getting from this is adding the mouseover immediately after the paragraph class and right before the Check out the podcast! line...removing from the paragraph the text that is repeated. It seems to look OK on IE, both full screen and when I make the screen smaller. Foxfire is displaying it less reliably though. As soon as I make the window smaller, the layout shifts. I know that it's normal for different browsers to display differently.

Any way to work around the rules so that it looks right, but is not, in fact, coded properly.
<h3>January</h3>
<a href="melanie.jpg"><img src="melaniethumb.jpg" alt="Melanie Morris" width="100" height="97" align="right"
border="0" hspace="150" /></a>
<p class="content">
<a href="#" onmouseover=
"alert( 'Concerts sell out quickly so act fast!');">Melanie Morris entertains with her melodic folk style.</a>
Check out the podcast!<br />
CDs are now available.
</p>

View 5 Replies View Related

Print Single Web Page Repeatedly Using Asp.net

Aug 13, 2009

I am using window.print() for print the web page, its working fine but i want more than one copy each and every time the the window will pob and ask me to select the printer name instead of that i want to pass the printer name through code if possible to print like this.

View 2 Replies View Related

Make An Object Move Repeatedly While A Key Is Held Down?

Mar 23, 2011

Anyone know of a good tutorial for making an object move repeatedly while a key is held down (ie move right 1px every second while right arrow key is held?)

View 3 Replies View Related

Youtube Chromeless Player - Videos With An Id That Contains An Underscore Or Dash Don't Play Although They Play In The Normal Player

Dec 11, 2011

I am using the youtube chromeless player and embeding videos with loadVideoById() method problem is that videos with an id that contains an underscore or dash dont play although they play in the normal player. I also tried replacing with a hex value in querystring i.e (%5f) but that did not work I also tried loadVideoByUrl() method with several urls but still they don't load. here is my code

function switchToPlayer(ytid){
var params = { allowScriptAccess: "always"};
var atts = { id: ytid,onmouseover: "this.playVideo()",onmouseout: "this.pauseVideo()"};
swfobject.embedSWF("http://www.youtube.com/apiplayer?border=0&enablejsapi=1&playerapiid="+ytid, 'cell'+ytid, "150", "120", "8", "scripts/expressInstall.swf",null,params,atts);
}
[Code]....

View 4 Replies View Related

Mail Service - Attach Some Excel Files Of Text Files And To Send It

Aug 16, 2010

I have designed a mail service in java.In my compose page,i want to attach some excel files of text files and to send it.After sending i want to store it my database.Then how can i download or open that file after opening that recipient mail inbox.

View 1 Replies View Related

XMLHttpRequest Script - Works For Local XML Files But Not For External XML Files?

Oct 2, 2010

I have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.The script works fine when the requested XML file is stored on the same server as the script.The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?

Javascript Code

Code:

window.onload = initAll;
var xhr = false;
function initAll() {
document.getElementById("makeTextRequest").onclick = getNewFile;

[code]....

View 6 Replies View Related

JQuery :: Ajax Request Works With .xml Files But Not .php Files?

Aug 27, 2010

In my quest to implement ajax for the first time i've hit a brick wall. i've been searching for hours for a solution but with no success. Here is the problem.

[Code]...

why is it not working? my PHP code is outputting the contents of the xml document.

View 1 Replies View Related

List All Files In A Folder Including Subfolder Files?

Sep 5, 2008

I want to write a javascript to list of all files in a folder including files in the subfolders. This is for the scorm purpose to list all the files. some examples are listing files but not listing the files inside the subdirectories. I want the file's full path like C:Documentsjavascriptwilson.js like this.

View 5 Replies View Related

Show Images From Four Files - Each Files Are In Each Folder?

Jan 15, 2010

I have four folders and each folder has one images, let say ( images-one.jpg, images-two.jpg, images-three.jpg, images-four.jpg). now,in index.php page there are four buttons, each buttons for each images. if i clicked button numer two for images-two.jpg, and then it will show that images name from that folder in index.php page. and then if i reload same index.php page or refreshed same page, i want to show SAME images that I clicked before which is images-two.jpg. how can i write that code to show images from four files, each files are in each folder.

View 1 Replies View Related

Multiple Language Files - Use PHP Language Variables In Files?

Jan 9, 2011

What is the correct way to work with multiple language JavaScript files? So how to use your PHP language variables in your JavaScript files? The way I do it now is create JavaScript files like 'script_js.php' like this:

[Code]...

View 10 Replies View Related

Play .wav

Jul 20, 2005

Any body know of a javscript that will play a sound.wav file repeatedly onLoad?

View 4 Replies View Related

Play Wave

Jul 20, 2005

This is a simple question. How do I preload a wave file and play it on command?

View 4 Replies View Related

How To Play A Mp3 OnClick()

Sep 16, 2009

I have a site [URL] It shows 9 series. Each series has a set of artists and titles. The images are loaded dynamically.

I would like to be able to click on an image of an album and play an mp3 file associated with the image. The <embed> tag doesnt need to show a playlist, in fact, I want the player to be hidden.

provide sample code of a click event to play mp3?

View 14 Replies View Related

Unable To Play Mp3 In FireFox

Jul 29, 2009

I've created an html page where I will present a list of mp3 tracks which user can listen to. When a user clicks on any track, a pop-up will get open which will play that track. The url of this pop-up, which is partly completed is, [URL]

For this I've googled around and found a solution. But this is working fine in IE but not in FF. This solution uses a "m3u" file for the purpose. And I've got this from here: [URL](please scroll down).

In FF, it says to download a plugin but when I click, it searches for the plugin and displayes error message as "No suitable plugins found Unknow plugin(audio/x-mpegurl)"

I want to commit that I do not have quicktime installed on my system but window media player which is getting used when page is viewd in IE.

how to make this work. I've also set the MIME type under HTTP Header in IIS 6.0. The header set are: .m3u; Mime type: audio/x-mpegurl and mp3; Mime type: audio/mpeg

Though, it is an ASP page but nothing is ASP code over there, completely, JS and HTML

Code for sound.asp file

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<script language="JavaScript" type="text/javascript">

[code].....

View 1 Replies View Related

How To Play Music On A Site?

Jun 22, 2010

this site [URL] plays music when you are there.

how do they do it?

View 1 Replies View Related

Play An Mp3 On Image Click?

Jul 8, 2010

I have about 40 images on an educational website. When the user clicks each image, a different one second long mp3 should play without opening a new window. Is it possible to do this with javascript?

View 4 Replies View Related

Can't Seem To Play MP3s With JPlayer

May 23, 2011

I can't seem to play MP3s with jPlayer, only OGG.

View 3 Replies View Related

Can't Play MP3s With JPlayer

Jun 14, 2011

I can't seem to play MP3s with jPlayer, only OGG. My custom code is below:

<script type="text/javascript">
//<![CDATA[
var audioPlaylist;
var Playlist;

[Code]....

View 3 Replies View Related

Play Sound After X Seconds?

Jun 25, 2006

I have built an admin area for employees of a business. Once logged-in, if they sit idle for 5 minutes their session will be killed ( the time may vary depending on the employee ). I do all this with php but don't really know much about javascript.

What I would like to do is start playing a small sound repeatedly when the employees session is about 30 seconds from expiring. ( this will give the employee time to click on a link to keep their session alive )

So when the page loads, I would like to pass a length of time in seconds to a javascript. So if the employee can sit idle for 5 minutes, that would be 300 seconds. Minus the 30 seconds that I would like the alarm to be playing for which gives us 270 seconds. ( I'll pass this number to the script with PHP, the script does not have to figure this out... just to be clear. )

So I'm looking for something like this:
- On page load, tell javascript to count down a specific number of seconds ( 270 )
- When the countdown reaches 0, start playing sound file repeatedly.

Sounds easy enough but I haven't been able to find anything like this yet. The only ones I've seen actually display the countdown which I don't want. I want this to count down invisibly. Oh and it should hopefully work in both IE and Firefox.

View 1 Replies View Related

How To Play Song Online?

Sep 28, 2006

I have been looking for the answer for a long time, but could not reach to any answer. I am a novice web designer, have very little knowledge on web programming. I hope someone here could help me with the following. The problem scenario is this:

I have a webpage where I have listed some classical songs so that page visitors can listen to song online. All files are in Real Audio format either with .rm or .ra extension. These individual audio files are linked with .ram files so that when visitor’s clicks on the song title, this .ram file launches RealPlayer and the clicked song starts playing. Once a song is played it stops. If user wants to hear another song, user needs to click on another song title to play that song. This is annoying for users.

However, I have seen on some websites where user can select the songs by clicking on the “Check Boxesâ€&#65533; next to each song titles and play by clicking on the “Playâ€&#65533; button. Therefore, user can select lists of their favourite songs by clicking on check box and play these together one after another. There are two other buttons also available for users: “Select Allâ€&#65533; songs and “Resetâ€&#65533;.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved