Morphic in Snap!

It isn't shared.

Of course. I always forget too share it.

Should be shared now

Then how come right-click doesn't say "click" on computers?

I think I may know where the problem is--I just need to check the source code.

No, see, a right click doesn’t trigger mouse down.
So first, you start pressing on the sprite. Your program is waiting for the click to last a certain amount of time, but before it lasts that long, the snap! program turns the click into a right click, meaning that the mouse down button no longer reports true so your program thinks you just stopped pressing, and registers a normal click.

Turns out it would have to be <0.3 so probably not a viable option

I now want someone to test something I just added--press the green flag, then long-hold the stage, and tell me what happens.

mobile or Mac
edit: nvm I'll just do both

on Mac:
the sprite says true for the duration of the press.
on iPhone:
the sprite says true for a moment but quickly switches to saying false

I couldn't help it, I created a simple script to test if you click/held/dragged. Here it is


https://snap.berkeley.edu/snap/snap.html#present:Username=ego-lay_atman-bay&ProjectName=click%20test

I tested this on my ipad, and it seems that 300 milliseconds is the perfect time to detect holding. It's just before it decides to right-click.

Using hyperblocks, thus also supporting n-vectors:
untitled script pic(8)

I like 1 second long-hold, though.

to be honest, I was just more focused on getting the pythagorean theorem instead of optimizing it.

I'd just go with 0.3 seconds to get it to work on ios. I do also feel like 1 second is too long.

edit: I just realized that when dragging, if you go back to the spot you started, it'll say held. I fixed that here

I have an android tablet and a Chromebook, as well as a dell Inspiron laptop

Dell laptop has already been used in test, but chromebook and android, yes!

Chrome on Android:

Clicked = ok
Long-Clicked = ok

Mouse-Entered = ok
Mouse-Departed = not working, event only executed when I click screen later

That's working as it's supposed to.

Can you test on the tablet and Chromebook?

It's not your code, i agree: there is no mouse departed with a phone or tablet because the cursor does not move from place when released