This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Marc Krenn
Posted May 06 - Read on Facebook

Classic case of seemingly trivial task turning out to be not so trivial to solve:

1) Ping immediately onTouchStart ...
2) ... and every N seconds after (using Utils.interval) while the button is still being pressed.
3) Reset Utils.interval to prevent "interference".

#ping #hold #reset #interval #UtilsInterval


Marc Krenn

Does anyone have a better, simpler solution to this problem?

Jacob Sørensen

I'm not sure what you mean the problem is. However I actually made the exact same thing today. Maybe It can help:

Tisho Georgiev

Here's a cleaner implementation of what you're trying to do:

Marc Krenn

Thought it would be a good idea those interval functions into a basic class for easier handling:

* example:
* ping using intervalClass:

Read the entire post on Facebook