delay start of avi

Posted on 2004-09-09
Last Modified: 2008-02-20
I need to be able to delay the start of an avi to allow other events to occur.  I have created and used the following script, but there is a black flash between the gif and the avi.

<script language="JavaScript">
  image1 = new Image();
  image1.src = "images/vcr1.gif";
  image2 = new Image();
  image2.src = "video/tapein.avi";

  function picture1()
  function picture2()
<body onLoad="window.setTimeout('picture2()',10000)">
<div align="center">
<image name="form" dynsrc="images/vcr1.gif" start="fileopen"> </a> </div> </body> </html>

I know this isn't the best solution.
Question by:jern50

Expert Comment

ID: 12022805
why not simply call the function after the other events have occurred as opposed to setTimeout().  As for the flash between the gif and the AVI I'm guessing that is because you are switching formats so apbruptly if you want it to happen immediately I'd suggest either converting the clip into flash or converting the AVI into .gif format  I know this perhaps isn't the best solution perhaps the .gif into AVI and simply join the videos with the desired delay between the two things.
LVL 13

Accepted Solution

davidlars99 earned 125 total points
ID: 12036762
you can check if audio file was loaded like this

  image1 = new Image();
  image1.src = "images/vcr1.gif";
  image2 = new Image();
  image2.src = "video/tapein.avi";



but you have to load it this way inside the body content

<object id="audio" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
   <param name="FileName"  value="file3.avi">
   <param name="AutoStart"                 value="false">
   <param name="SendPlayStateChangeEvents" value="true">
   <param name="ShowAudioControls"         value="false">


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Popup to change image and store url in database 2 31
Change javascript css 1 21
bootstrap footer centering and expand problems 7 30
Jquery get each value 2 17
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now