@tofolux - A common technique is to create a separate JS document outside of Hype and put all your code there. You can organize that file any way you want to keep similar functions together. You make Hype aware of this document by referencing it within the HEAD of your HTML file, like so:
I also have a technique that I use a lot where I create one or two big JS ‘startup’ functions within Hype that contain all my major functions. I make every function within those global functions and use comments to organize similar functions. These ‘startup’ functions are executed on scene load in the first scene so that all the functions they contain can be called from there on out.
Either method still requires that you create and assign functions to buttons and timelines as needed, but those functions can now just call your global functions that are inside your ‘startup’ functions.
I hope that makes sense. Let me know if not! - John