Code: Select all
on mouseup
get backgroundcolor of me
set the brushColor to the backgroundcolor of me
choose bucket tool
end mouseup
Written in plain English, it was supposed to go something like this:
Get the color of the rectangle the student clicks on and use it to paint the parts of the image the student clicks on. When the student clicks on another rectangle, change to another color and paint the next parts of the image the student clicks on.
lol, so close! I can get into the coloring, but I can't reverse it and get out!
I had thought to have the bucket turn back into the cursor when the student left the field of the picture or hovered over one of the colored rectangles. When that didn't work, I tried to tell it to choose the cursor after the first mouse up on the image (it colors on the mouse down). This would mean that the student would have to continue to go back over and over even for the same color, but Plan A wasn't working.
Unfortunately, Plan B didn't work either because, as it says in the Users Guide, once I have the bucket tool going, the stack has turned off the browser tool and clicking won't send any more mouse messages or even key messages to the stack.
So, any ideas on how to allow the student to go back to select another color? What kind of purposeful action (I would prefer not to employ a timer as it might be frustrating for the student) could the student employ to go back to a cursor? I think choose browse tool should work if I can just find an event or action the stack will listen to while the paint tool is active. "If there is new paint on the image, choose browser tool?"
Or, is there a way to tell it to paint a section of the picture (the same way as the bucket tool does by changing the color of the clicked pixel and all of the connected pixels of the same color) by using the cursor instead of actually choosing the bucket tool?
There is a different image for each level, so I can't designate areas and have those areas have their colors set as a property (oh boy, I'm afraid that probably makes no sense at all to anyone but me) ??? And I'll be running the stack in StackRunner, so the tool bar won't be available to the student (and I don't want it available to them as a general matter of course).
Thank you very much for everyone's help.