setInterval and Behaviors
by "Keith Parker" <diades(at)diades.screaming.net>
|
Date: |
Sat, 1 Jul 2000 22:36:36 +0100 |
To: |
"hwg Languages" <hwg-languages(at)hwg.org> |
|
todo: View
Thread,
Original
|
|
Hi,
I am currently writing a behavior and wish to use setInterval but it keeps
causing the script to stop working. Can setInterval be used within a
behavior and, if so, how?
I have the following:
<PUBLIC:METHOD NAME="LowerMenu" />
<script>
function LowerMenu(){
style.display = "block"
down = setInterval("lower()",2)
}
function lower(){
style.pixelTop = offsetTop += 30
if(offsetTop >= 400){
style.pixelTop = 400
clearInterval(down)
}
}
</script>
When LowerMenu() is called externally from another behavior routine, it
freezes.
Hope you can help.
Cheers,
Keith
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA