Re: setInterval and Behaviors
by "Rossi Designs" <webmaster(at)rossidesigns.net>
|
Date: |
Sat, 1 Jul 2000 21:15:40 -0400 |
To: |
"Keith Parker" <diades(at)diades.screaming.net>, "hwg Languages" <hwg-languages(at)hwg.org> |
References: |
diades |
|
todo: View
Thread,
Original
|
|
Your script is calling lower so often you can't see it, the function takes a
value in 1/1000 of a second. try 2000 and see if it works like you want.
Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084
Phone : (904) - 226-8979
URL : http://www.datadrivendesign.com
URL : http://www.rossidesigns.net
----- Original Message -----
From: "Keith Parker" <diades(at)diades.screaming.net>
To: "hwg Languages" <hwg-languages(at)hwg.org>
Sent: Saturday, July 01, 2000 5:36 PM
Subject: setInterval and Behaviors
> 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