@aaronventure this did the trick ! many thanks!
//button const var Buttonx = Content.getComponent("Buttonx"); inline function onButtonxControl(component, value) { if (value) { // Button pressed, start animation p.startTimer(1000.0 / object.frameRate); } else { // Button released, stop the animation p.stopTimer(); } } Content.getComponent("Buttonx").setControlCallback(onButtonxControl);