APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Interactive objects post and replies

Return to the Interactive objects thread
Login to post to this thread

How to assign code at drawing panel objects?
Carlos Garcia
2 Posts

Hello,

I'm trying to make a boardgame app with EJS and I need to have interactive objects.
The problem I have is when I put one token, picture or something that must be interactive, I don't know how to do when I press on it it does something. I have the "On press" option, but it only let me assign a java pre-defined function.

Thank you!


Replies to How to assign code at drawing panel objects?

Re: How to assign code at drawing panel objects? -
Carlos Garcia
2 Posts

Solved: You must enable it in Moving option, putting it on fixed (because I want it works like a button)

Attached File: Captura.PNG



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book