Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run 2 dhtml animations not at the same time

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've got 2 dhtml animations in my web site. When it loads, I would like to see the first one running, and only when the first one has finished, the second one starts.<br>Is there a way to do this?<br>Thanks!
 
usually for a dhtml animation the function that moves the object around goes something like this:<br><br><i>function dhtmlAnimation(){<br>//stuff to make the div move.<br>div.left+=4;<br>div.top+=5;<br>//...<br>//and then test to see<br>//if it needes it, make the function run again<br>if (div.left&lt;=155 ¦¦ div.top&lt;=200) {<br>setTimeout('dhtmlAnimation()',55);<br>}<font color=red> else {<br>otherDhtmlAnimation();<br>}</font><br>}<br><br></i>the part in red is the important part.<br><br><br> <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top