Playing Script On A Certain Time?

Jul 14, 2010

Suppose I have some function ... myFunction(); And I want it to be executed from 3am - 11pm but not at any other time So far what i had done is along the line of

for(i=0;i<99999;i++)
{
var time = new Date();
var hours = time.getHours();

[code]....

If it is the right time it loops over and over and continually executes the function (which is what I want)If it's the wrong time (not 3am-11pm) it loops once, doesn't execute the functoin and then the script finishes (whereas I want it to continue looping until the right time comes along)If its the right time and then it moves to the wrong time it stops looping, whereas i want it to not execute the function but continue looping until the right time comes around again. So the overall affect is that at the given times of day the script plays and when its not the correct time it doesnt and then when it is the right time again it starts playing again, seemlessly and continually.

View 2 Replies


ADVERTISEMENT

Div Playing Video Keeps Playing After Leaving Div

Dec 26, 2010

User clicks on image map that displays DIV1 with player id="Player1". When user clicks on another part of the map, DIV2 appears with another video - but DIV1's player "Player1" keeps playing. How can I stop the event after going to another div? Lots of efforts "out there" but I've yet to find out just how to do it successfully.

View 1 Replies View Related

Make The Player Select Playing With The Computer Or Other Player And Select Who Player Beginning Playing?

Dec 29, 2010

i need code in javascript to make the player select playing with the computer or other player and select who player beginning playing

View 2 Replies View Related

Just One Of Several .flv Files Not Playing?

Jun 15, 2009

my website [URL] has been left unfinished by my friend and it doesnt look like he can finish it now. I have some understanding of code and have manually edited the existing pages in notepad to fix some issues. The one issue I have left is on the javascript samples player which overlays the main screen. I have all of the files (an flv and swf plus a folder full of js and a vbs file). As you will see, the morning chapter does not play but all of the others do. I have checked the flv in a player and it works fine, and it was created in the same way as the others. All flv and swf files are uploaded correctly I just can't work out why it is not working.

View 9 Replies View Related

IE 5.5 Not Playing Ball?

Oct 21, 2005

i've got the following code that checks the browser width and then redirect is it's under 500px, but IE 5.5 just redirects regardless:

<script language="javascript" type="text/javascript">
function checkBrowserWidth()
{
var theWidth = getBrowserWidth();
if (theWidth < 499)
{
window.location.replace("/handheld/");
}
return true;
}
function getBrowserWidth()
{
if (window.innerWidth)
{
return window.innerWidth;
}
else if (document.documentElement && document.documentElement.clientWidth != 0)
{
return document.documentElement.clientWidth;
}
else if (document.body)
{
return document.body.clientWidth;
}
return 0;
}
checkBrowserWidth();
window.onload = checkBrowserWidth;
</script>

any ideas??

View 4 Replies View Related

Playing Quicktime Movies

Jul 20, 2005

I have a webpage with thumbnail images that I want to be able to click on to play associated Quicktime movie files in either IE or Netscape. I'm having difficulty finding any HTML or Javascript code for doing this, and was wondering if this is not an easy thing to do. Is there
some special code needed for detecting Netscape Quicktime plugins, and what about IE?

View 1 Replies View Related

Playing Sound With Mouse Over?

Jul 23, 2009

Is there any universal way (for all browsers) of using JavaScript to play some sound when you mouse over some link? If yes can somebody link me to this code or at least write me how one would do this?

View 5 Replies View Related

Playing Sound On Mouseclick?

Dec 22, 2010

How can I play a sound when I click an image, without the information bar popping up at top? I've looked all over, and I've tried a few javascript-only methods but none have worked for me.. Is flash the only way to go?

View 1 Replies View Related

Playing Sounds Sequentially

Oct 26, 2007

I am creating a web interface where a user can click on a series of pictures and then click a 'play' button to play the sound (wav) files which are behind each picture in sequence.

So I have an onclick event attached to each image which loads the name of the wav file into an array. The play button loops through these sounds and plays them one at a time....or so it is meant to!

I have found that all the sounds play one on top of the other and I have been searching for hours to find a way to make them play one after the other.

I don't want to use a flash interface as I can't convert them all to flash. Does anyone know of a way to do this using javascript? I would be very very grateful if so.

View 1 Replies View Related

Playing A Sound On A Local Pc From The Web

Oct 31, 2007

I am developing a web application where each page shows a series of small jpg images each with an onClick event which plays a small mp3 file using javascript.

It all works perfectly but is a bit slow to load, so the customer wondered if we might develop a local version which, although the page was accessed via the web, the images and mp3s were installed on a users local pc (will be machine specific application anyway).

I have managed to do this for the images by using:

<img src="file:///C|/folder/home.jpg" onClick="EvalSound('shortname')">

and adding the site as a trusted site in IE7 (after much head scratching!).

However, my embed statement to embed the local mp3 files doesn't seem to work. I am using:

<embed src="file:///C|/folder/filename.mp3" autostart=false width=0 height=0 name="shortname" enablejavascript="true">

I have tried all sorts of versions of this path and nothing seems to work. I just get an 'unspecified error' when I click the image.

View 1 Replies View Related

Two Persons Playing Game Together

Jul 12, 2009

i am in my efforts to perform a coding for a chess game between two persons who play with each other from different computer systems through internet. i want to know about how i can code in such a manner that when player 1 makes some move, player 2's chess board in his respective screen shows him the move of player 1 and vice versa. this has to happen without reloading the page.

View 5 Replies View Related

Html5 / Css - Video Keep Playing

Jun 30, 2011

I'm trying to write a site a hosts some of my own videos. I want to have a list of videos, each as a link, and when I click on one I want it to load on that same page by graying out everything else but the video. I'm using html 5 and css and I can get the video to come up, but the problem is that when I go to that page, all of the videos load. If I play a video from the pop up window and then close the window, the video will keep playing.

View 5 Replies View Related

JS Flash Movie Not Playing?

Feb 11, 2009

I have a website that I just inserted a flash JS movie into... The site looks fine, and it even says that the movie is loading, but after that... NOTHING... I tried removing the <noscript> tags, but nothing seems to be working.

View 15 Replies View Related

Scripts Not Playing Together Nicely / Fix It?

Jan 19, 2010

I am trying to get two scripts to run on the same page in Firefox - I haven't had the chance to sort out cross browser compatibility yet as I am not feeling like a glutton for punishment. The scripts are for a slideshow and a news slider. I can get one to run, and not the other, but they won't run together. The page link is ... The page is currently showing the news slider as functioning, but not the slideshow (hence the pictures flooding the page....).

Is it an issue of too many jquery references?

View 4 Replies View Related

Playing A .wav File - And HTML

Jun 28, 2010

I am trying to play a .wav file and have it start at a specific part in my javascript. I found some code, but it doesn't seem to work in firefox, but does in IE. It also starts from start and I would like to start it at a specific time and then play it for about 10 seconds and then have it stop. Can someone help me with some example code?

View 1 Replies View Related

Playing Sound In HTML5?

Jan 19, 2011

I can play a sound on my local machine, but when I upload to a server the same code it does not play. I cannot work out why, the link below gives the code. The multi channel code is here:

[URL]

I installed Firebug and insepcted the Net components and can see that the .wav files are being ought out but returning a 304 and then 404 error. This would be fine, however the path being sought is correct. Going to link does'nt play the sound, but removing the file and paring back to the directory brings you to the directory on the server and clicking the file does play the sound. The code works locally, and I simply cannot see what could be causing the issue in the server versions on both Firefox and Chrome.

View 3 Replies View Related

IE Keeps Playing Audio Of Hidden Div

Feb 24, 2011

I'm trying to stop the audio in a hidden div from playing once a user clicks on the next video clip. i know this is a known bug in IE but i can't figure out how to fix this (as i am a total noob). can someone tell me how i can do this? And yes, my client refuses to use firefox and only IE

Here is my current code.

View 1 Replies View Related

Loading And Playing A Sound With Javascript

Jan 17, 2006

I was wondering if there was a way to load a streaming/static
mp3, wav etc. with javascript and then beign able to control its
playing, pausing etc.

View 5 Replies View Related

JQuery :: Flash Videos Not Playing ?

Oct 22, 2009

I am having an issue with flash that are being called using javascript not playing .

Here is an example of one of the pages: [url]

This page is referencing a file called terry.js

For some reason the flash banners we use work just fine: [url]

Its only the videos that aren't working. We are referencing the videos the same way we reference the banners with the exception of the their class names.

The weird thing is that these videos were working just fine last week but now they simply do not display.

View 1 Replies View Related

JQuery :: Playing Arround With Integers?

Nov 28, 2011

I'm playing arround with integers.

1.000.000,00 // throw error
1,000,000,00 // throw error

1000,00 // success
100.00 // success

And on success I have to get all numbers before the dot or comma .

View 6 Replies View Related

Auto Form After Playing 20s Of Video?

Jun 3, 2011

how can I code this wherein I upload a video and generate an embeddable video script code wherein the video plays for about 30 seconds or so and then it the video stream stops and present an input field wherein they have to enter their name, and email address and other pertinent info after which the video will again continue to play?

View 6 Replies View Related

Playing Certain Audio Files - Or Possibly PHP

Jun 10, 2010

I want to use HTML5's audio coding similar to the one below:

In order to play sound files depending on the input. What I'm working on is a text-to-speech webapplication.

What I'd need to happen is for there to be an input and then allow the user to type anything into the input, so if they type in:

Hello, how are you doing?

Javascript or PHP will recognize each character and translate it into an audio sequence.

In example:

It'd detect the "H" in hello and play sound file "H.ogg"

It'd then detect the "E" in hello and play sound file "E.ogg"

View 3 Replies View Related

How To Delay Autostart Of Playing Music?

Jan 4, 2006

In the HTML I use a simple code to autostart a short piece of music with an endless loop. Now I would like to delay the autostart with 0.5 second. How can I do that?

This is the HTML:
<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
<title>Welcome to Adobe GoLive 4</title>
</head>

<body>

<embed src="05inspiratie-g.mp3" autostart="true" hidden="true" loop="true" width="0" height="0">
</body>

</html>

View 2 Replies View Related

Playing Media Player With Firefox Via JS?

Jul 10, 2009

I have a javascript with code that looks like this:

var bdiv=document.getElementById('mysong');
bdiv.Play();

where mysong is the id of the embedded media player.

This script works fine in Internet Explorer but not in Firefox.

Error console says bdiv.play is not a function.

View 2 Replies View Related

IE Won't Stop Playing Audio When Div Is Hidden

Feb 24, 2011

I've a video list and when a user clicks on a video link it should play the video in one area of the page. but when you click on the second and third video links the audio from all videos play at the same time. i know this is a known bug in IE but for the life of me i can't fix it. it works fine for firefox but my client uses IE

How to stop the audio of the previous video when a new video link is clicked on?

<SCRIPT LANGUAGE="JavaScript">

View 1 Replies View Related

IE Not Playing Nicely With Accessing File

Mar 23, 2011

I'm trying to allow a user to select an XML file so that my javascript can parse it and create some pins for a google map.It works fine in Firefox, and by using FireBug I can see that the file is being accessed as expected.IE on the other hand tells me that "'files.0' is null or not an object" on line 68 of address locator. php.

View 1 Replies View Related







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