How can I cause a script to be executed on an object when I click on it? (Beyond MouseDown)
Posted by
Steve Thomas on
Mar 29, 2011; 10:49am
URL: https://forum.world.st/How-can-I-cause-a-script-to-be-executed-on-an-object-when-I-click-on-it-Beyond-MouseDown-tp3414428.html
For example, I want to some buttons to transform a costume or set an objects color and I want to click on the button and then be able to click on an object (or set of objects) and run a particular script on the objects I click on.
I could program each object to perform a particular action on Mouse Down, but I would rather write the script once and then have that script execute on the object I click. I was able to achieve this by using a Player variable watcher and then having a constantly running script that tests if the myPlayer != dot and if so, run the script on the Player variable value, then reset to dot. But besides looking ugly (the dot always shows) I can only run on one object at a time then have to click on the Player variable's watcher.
Thanks,
Stephen
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev