codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Automation Problem  Antibland at 06:15 on Sunday, July 24, 2005
 

Hi,

I'm trying to figure out how the following script could be looped so that the following animation didn't end. Here's a link to the animation: http://www.screen-card.de/test/css/clip_test.html. Notice that the scrolling color bars end after only a short while. How can I change the code so that they don't end?

Thank you,

Andrew


------------------------------------------------------------

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script language="javascript">
<!--
function move_init(was) {
position=0;
if(was=="flaeche") {
move_up(position);
}
else {
links=100;
rechts=400;
move_farben(position,links,rechts);
}
}
function move_farben(position,links,rechts) {
document.getElementById("clipdynamisch").style.clip="rect(auto " + rechts + "px auto " + links + "px)";
neu_pos=position;
neu_links=links;
neu_rechts=rechts;
document.getElementById("clipdynamisch").style.left=position+ "px";
setTimeout('move_farben(neu_pos-1,neu_links+1,neu_rechts+1)',50);
}
-->
</script>
<head>
<style>
#clipdynamisch {
position:absolute; /* absolute Positionierung wegen Clip */
top:91px;
left:0px;
width:754px;
height:2px;
z-index:4;
}

#clipstatisch {
position:absolute; /* absolute Positionierung wegen Clip */
top:101px;
left:0px;
width:754px;
height:10px;
z-index:3;
background-color:green;
clip:rect(auto 400px auto 100px);
}

#ohneclip {
position:absolute;
top:111px;
left:0px;
width:754px;
height:10px;
z-index:3;
background-color:red;

}

.ministreifenblank {
position:relative;
height:2px;
width:5px;
float:left;
}

.ministreifenblau {
position:relative;
height:2px;
width:29px;
background-color:#003399;
float:left;
}

.ministreifenrot {
position:relative;
height:2px;
width:29px;
background-color:#CC3333;
float:left;
}

.ministreifenbeige {
position:relative;
height:2px;
width:29px;
background-color:#FFCC99;
float:left;
}

.ministreifenorange {
position:relative;
height:2px;
width:29px;
background-color:#FF6600;
float:left;
}

.ministreifengruen {
position:relative;
height:2px;
width:29px;
background-color:#99CC33;
float:left;
}

.ministreifengrau {
position:relative;
height:2px;
width:29px;
background-color:#CCCCCC;
float:left;
}

.ministreifenhellblau {
position:relative;
height:2px;
width:29px;
background-color:#3399CC;
float:left;
}
</style>
</head>
<body onload="move_init('farben');">
<div id="clipdynamisch">
<script language="javascript">
<!--
var mini=new Array("blau","rot","beige","orange","gruen","rot","blau","beige","grau","gruen","orange","blau","beige","rot","blau","orange","gruen","rot","gruen","orange","grau");
var len = mini.length;
for(i=0;i<len;i++) {
document.write('<div class="ministreifen' + mini + '"><!-- --></div>');
document.write('<div class="ministreifenblank"><!-- --></div>');
}
-->
</script>
</div>
<div id="clipstatisch"><!-- --></div>
<div id="ohneclip"><!-- --></div>
</body>
</html>


------------------------------------------------------------










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Digital.Canal.Software.V2013
•  Altair_HyperWorks_12.0.1_Win64
•  Global.mapper.V15.0
•  ESI.PAM-RTM.V2010.0
•  KISSsoft.03.2013E.SP5
•  Technical.Toolboxes.Pipeline.Toolbox.2013.Enterprise.v15.0.0
•  Simprotek.Simprosys.V3.0
•  Ricardo.SABR.V6.0p1
•  PSIM.V9.2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013