You must be a Pro member to watch this episode.

Get Access Now

Sign in now if you're already Pro.


Build Some Buttons


Intro to Scripting


Building a Functional Timer


Building a Functional Timer

Published by Chris Slowik

Episode Notes

Extra tips from the author

Scripts and Actions

Building complex functionality in Kite is really all about connecting scripts and actions. Scripts can provide the base logic and functionality for your more complex features, and actions are perfect for driving any sort of gestures or interactive features. It's really a similar structure to how things are built in code - gesture handlers often call other functions and parts of the code to accomplish tasks.

Using some simple javascript functions and a clever connection to some actions, we can make a parametric timer component, dependent on the value of one global variable!

Watch out for this little bug..

If you write a function in a script, and it starts on line 1, Actions will not be able to see it. The current workaround I've found is just to make sure there's at least one line of text or whitespace above any functions in your script. If you don't delete all the boilerplate comment code, you'll never encounter this though.

Episode Topics: