[Newbies] Stop a script for a second
Bert Freudenberg
bert at freudenbergs.de
Wed Nov 29 21:10:55 UTC 2006
On Nov 29, 2006, at 19:17 , Martin Bleichner wrote:
> Hi together,
>
> I am new to this list. So perhaps I should introduce myself. I am
> 25 year old german student studying congitive neuroscience in
> Utrecht/Netherlands. I want to use squeak /etoys mainly for
> exploring and visualizing some ideas in a quick way.
>
> Right now I want to build a prototype for an experiment and think
> that this is a good project to learn a bit more about squeak.
>
> I want to program a sequence of objects appearing on different
> positions on the screen one after the other and later in a random
> order.
> A very dirty way to do so is just script doing something like.
> object1 show.
> script wait for 1000ms.
> object1 hide
> object2 show
> script wait for 1000ms.
>
> I know that this is a very basic question but couldn't find the
> answer, as I don't know what it is I am looking for.
Waiting inside a script is not supported in this version of etoys.
What you can do instead is this:
script ticking once a second, for an object with a variable named i
* increase i by 1
* Test i = 1 Yes: obj1 show
* Test i = 2 Yes: obj1 hide, obj2 show
* Test i = 3 Yes: set i to 0
- Bert -
More information about the Beginners
mailing list