Calling a function from "button"

Hello everybody,

My document has an onSceneLoad that fires a Trigger Custom Behavior that holds all of the javascript logic for my site.

In this behavior, I have a function named testMe.

How can I call that function from an element being clicked on the stage?

Any help would be appreciated.

Once you define a Custom Behavior, you can select it in the ‘Mouse Click’ area of the Action inspector when you have an element selected:

If you just wanted to run TestME, then you would use the ‘Run JavaScript’ function here.