Streaming live at 10am (PST)

Trigger javascript on element event (such as onclick)


#1

Hello, I am new to webflow and i am considering to rebuild my project here if all the requirements are present.

I am doing a game. I have a javascript engine that renders in a canvas, and i am using external server and database. I want to create a webflow static website to serve as UI/interface of the game.

So i want to fully integrate my code into the static webflow page.

So far, i have been liking webflow, but i need a certain feature:

  • Easily way to create a javascript response, when a webflow element is clicked, hovered etc… (directly from the webflow element tab).

Maybe this is already supported? or there is a easy way i could make this work…
I appreciate any help.


#2

Hi @Andre_Marques

I can’t help on the custom code side, but here’s an intro to the various interactions you can set up using Webflow: https://university.webflow.com/topic/design-interactions-2-0

Also paging @matthewpmunger who made a game in Webflow :wink:


#3

Hey guys

That maze game was done entirely with built-in interactions and no custom code. Fun little sample project. If you need any help or advice with interactions, please tag me and I’ll see what I can do.

For now, maybe this tutorial by @mistercreate can give you some direction or inspiration. It also pertains to a custom canvas based on user input.