Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #21405
| From | Stefan Weiss <krewecherl@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Draw/animation fail to stop |
| Date | 2013-09-22 06:47 +0200 |
| Organization | albasani.net |
| Message-ID | <l1lspu$ckd$1@news.albasani.net> (permalink) |
| References | <7f279d3b-dab8-4021-86f4-c504200547b3@googlegroups.com> <XnsA242A16BD8F17eejj99@194.109.133.133> <434079c0-5e5c-4aa0-be66-0ac5ec77e50e@googlegroups.com> |
On 2013-09-22 05:14, jonas.thornvall@gmail.com wrote:
> Den lördagen den 21:e september 2013 kl. 15:52:06 UTC+2 skrev Evertjan.:
>> jonas.thornval wrote on 21 sep 2013 in comp.lang.javascript:
>>
>> > function initanime()
>> > {
>> > size = 0;
>> > start = 0;
>> > multip = + 1;
>> > run = 1;
>> > refresh = setInterval(draw, 0);
>> >}
>> >
>> > This funtion i call to stop the draw/plot also from a form.
>> >
>> > function stopanime()
>> > {
>> > clearInterval(refresh);
>> >}
>> 1 you need to define the variable "refresh" outside the functions.
> Thank you Evertjan it was because variable was local.
I don't get it - neither Evertjan's suggestion, nor why this has
apparently solved the problem. Everything in this script is global,
there are no local variables. So how can declaring "refresh" outside of
the functions change anything?
> 2 an interval of 0 ms is not an interval.
It's not? Next you're going to tell me 0 is not a percentage.
http://tinyurl.com/zeroperc
- stefan
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Draw/animation fail to stop jonas.thornvall@gmail.com - 2013-09-21 06:33 -0700
Re: Draw/animation fail to stop "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-09-21 15:52 +0200
Re: Draw/animation fail to stop jonas.thornvall@gmail.com - 2013-09-21 20:14 -0700
Re: Draw/animation fail to stop Stefan Weiss <krewecherl@gmail.com> - 2013-09-22 06:47 +0200
Re: Draw/animation fail to stop JJ <duh@nah.meh> - 2013-09-22 13:05 +0700
Re: Draw/animation fail to stop "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-09-22 09:10 +0200
Re: Draw/animation fail to stop jonas.thornvall@gmail.com - 2013-09-22 01:30 -0700
Re: Draw/animation fail to stop jonas.thornvall@gmail.com - 2013-09-22 01:40 -0700
Re: Draw/animation fail to stop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-22 12:42 +0200
Re: Draw/animation fail to stop Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-09-23 18:06 +0100
Re: Draw/animation fail to stop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-24 01:00 +0200
Re: Draw/animation fail to stop Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-09-25 17:18 +0100
Re: Draw/animation fail to stop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-26 00:55 +0200
Re: Draw/animation fail to stop Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2013-09-25 22:33 -0300
Re: Draw/animation fail to stop Andrew Poulos <ap_prog@hotmail.com> - 2013-09-26 15:21 +1000
Re: Draw/animation fail to stop Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-09-28 19:16 +0100
Re: Draw/animation fail to stop Christoph Michael Becker <cmbecker69@arcor.de> - 2013-09-22 14:14 +0200
Re: Draw/animation fail to stop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-22 15:06 +0200
Re: Draw/animation fail to stop Ken <usenet-so@abdiassoftware.com> - 2013-09-22 13:44 -0500
Re: Draw/animation fail to stop Ken <usenet-so@abdiassoftware.com> - 2013-09-22 13:50 -0500
csiph-web