How can I let the user paint an area and test if it is done?


(John Grigni) #1

A client has a training game where the user has to ‘paint’ an arbitrary area so that it is completely covered before advancing to the next step. How could I do something like that?


#2

Hi John!

I just posted an example that might be roughly (maybe too roughly :face_with_raised_eyebrow:) what You are looking for - or at least in the ballpark - but there is no check to see if any painting is done. You could add that “feature” by having the desired clicked element(s) register the click and check to see if the element(s) qualified as having finished painting the area. This scenario would of course take JavaScript to implement.


(Jonathan Deutsch) #3

The AlphaPod example on the Tumult Hype Gallery has a painting area that advances when complete. You can download the .hype document and see how they do it. It looks like it is using a scratch.min.js file and functions in the Hype document (ScratchPad) that operate on some of the elements (over, under, Container).

(There are probably some other threads in these forums that have examples too)