Hi all,
Three questions about etoys.
First, is there a way I can capture the event of turning a page in a book to fire off a script? Specifically:
1. click next to go to page4
2. this fires page4.startTheFun
3. click prev, then click next again
4. fires page4.startTheFun again
Second, when looping within a script, it appears that the screen updates are batched. If I do "repeat 10 ... forward 10", it looks the same as if I did "forward 100". Is there a way around this, or do all screen updates happen on a clock tick.
Last, is there a way to wait a set amount of time, other than rolling my own "wait" using a variable?
On Nov 1, 2007, at 6:57 , Timothy Falconer wrote:
Hi all,
Three questions about etoys.
First, is there a way I can capture the event of turning a page in a book to fire off a script? Specifically:
click next to go to page4
this fires page4.startTheFun
click prev, then click next again
fires page4.startTheFun again
Don't know - I'll let others answer this.
Second, when looping within a script, it appears that the screen updates are batched. If I do "repeat 10 ... forward 10", it looks the same as if I did "forward 100". Is there a way around this, or do all screen updates happen on a clock tick.
Disable the "batchPenTrails" preference. We now changed the default.
Last, is there a way to wait a set amount of time, other than rolling my own "wait" using a variable?
Not in this version of Etoys, no.
- Bert -
Scott,
Can your "event theater" help Tim do what he is seeking?
Kim
Begin forwarded message:
From: Bert Freudenberg bert@freudenbergs.de Date: November 1, 2007 3:59:17 AM PDT To: Timothy Falconer timothy@immuexa.com Cc: Squeakland list squeakland@squeakland.org Subject: Re: [Squeakland] event capture, batched screen updates, wait
On Nov 1, 2007, at 6:57 , Timothy Falconer wrote:
Hi all,
Three questions about etoys.
First, is there a way I can capture the event of turning a page in a book to fire off a script? Specifically:
click next to go to page4
this fires page4.startTheFun
click prev, then click next again
fires page4.startTheFun again
Don't know - I'll let others answer this.
Second, when looping within a script, it appears that the screen updates are batched. If I do "repeat 10 ... forward 10", it looks the same as if I did "forward 100". Is there a way around this, or do all screen updates happen on a clock tick.
Disable the "batchPenTrails" preference. We now changed the default.
Last, is there a way to wait a set amount of time, other than rolling my own "wait" using a variable?
Not in this version of Etoys, no.
- Bert -
Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
Hi, Tim,
If I'm understanding your wish correctly, this might most easily be accomplished by designating page4's 'startTheFun' script to be run on "opening".
Probably it's currently marked as "normal", so click on that "normal" button and select "opening" from the resulting pop-up.
Once you've done that, any time your user "goes to" page4 (e.g. by hitting the "next" button while on page 3,) the first thing that will happen after the new page appears is that its startTheFun script will run.
How closely does that match what you're after?
Cheers,
-- Scott
On Oct 31, 2007, at 10:57 PM, Timothy Falconer wrote:
...First, is there a way I can capture the event of turning a page in a book to fire off a script? Specifically:
click next to go to page4
this fires page4.startTheFun
click prev, then click next again
fires page4.startTheFun again
squeakland@lists.squeakfoundation.org