[etoys-dev] How can you play a particular sound based on text value

Steve Thomas sthomas1 at gosargon.com
Sun Feb 28 15:30:50 EST 2010


Thanks, I actually figured out another way. I create a script "playline"
that accepts a <string> parameter.  I then switch to text mode and change
the script as shown below:

playline: t1
self beep: t1


Then call the script with the text->Characters in the Holder.

I discovered this by looking at how the Scripting Tiles translate to text.

I've been thinking about how to transition kids from Etoys scripting tiles
to Squeak, this may provide an avenue, not sure. The challenge is to find a
good problem that they are motivated to solve and can be done with "simple"
Squeak commands.

Stephen


On Sun, Feb 28, 2010 at 7:39 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

> On 28.02.2010, at 04:24, Steve Thomas wrote:
>
> I created a Teleprompter for kids to rehearse plays, create and learn
> stories in response to a request on the IAEP list at Sugarlabs.
>
> See http://squeakland.org/showcase/project.jsp?id=9498 for the project
> and  http://www.youtube.com/watch?v=DgAMo-a9NcY for a how to use video.
>
> I would like to add the ability for them to record their parts (using sound
> recorder) and then have those parts automatically play when their line is
> displayed.  So for example say there is a play with four kids in a scene.
>  The kids could record their lines in the project (and automagically store
> that sound in the Holder for playback when that line is cue'ed). For example
> when a line is displayed there could be a button "Record line" (can do this
> now).  Then have a way to store a reference to that sound in the holder such
> that you can write a Script that plays that sound. (This is the part I need
> help with how to store a reference in the Holder and play the sound based on
> the reference item).
>
>
> Hmm, this indeed seems more complicated than it used to be. Maybe I
> misremember but this should be easy.
>
> Here's what you can do currently:
>
> 1. Press Cmd-m and from the "alphabetical list" choose
> RecordingControlsMorph. A simplified version of that is "RecordingControls"
> which is the default recorder nowadays.
>
> 2. Record a sound.
>
> 3. Make a SoundEvent tile by pressing the "Morph" button.
>
> 4. In the SoundEvent's viewer use "do menu item" from the "misc" category
> to invoke "play sound".
>
> - Bert -
>
>
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100228/c6d2fea3/attachment.html


More information about the etoys-dev mailing list