Bobo
07-11-2004, 03:52 PM
LOOK @ SCRIPT FIRST, so paragraph can be more easily understood
I have a script that, when I try to run it, works a for a about a millisecond, doing many times the math that the script requires (+=275), and then gives me an alert saying OUT OF MEMORY AT LINE 44. Notepad says line 44 is the line w/ the getElementById("~") thing. I think I've made a loop (that made the browser run out of memory, the scripts proccesses to run super fast[which caused the crash because there was no limiter on the script]) before the setTimeout but I don't see where/how.
<script>
function turny() {
var XWERT=document.getElementById("RNDRCTY").style;
XWERT.rotation+=5;
//Note:later add if(>360) {to0dg}
var Timer=setTimeout(turny(),1103)
}
function Stoyp() {
clearTimeout(Timer)
}
</script>
<v:roundrect... onMousedown="turny()" onMouseup="Stoyp()" ...>...
I have a script that, when I try to run it, works a for a about a millisecond, doing many times the math that the script requires (+=275), and then gives me an alert saying OUT OF MEMORY AT LINE 44. Notepad says line 44 is the line w/ the getElementById("~") thing. I think I've made a loop (that made the browser run out of memory, the scripts proccesses to run super fast[which caused the crash because there was no limiter on the script]) before the setTimeout but I don't see where/how.
<script>
function turny() {
var XWERT=document.getElementById("RNDRCTY").style;
XWERT.rotation+=5;
//Note:later add if(>360) {to0dg}
var Timer=setTimeout(turny(),1103)
}
function Stoyp() {
clearTimeout(Timer)
}
</script>
<v:roundrect... onMousedown="turny()" onMouseup="Stoyp()" ...>...