Comments on: Kontakt Scripting (KSP) :: Custom UI :: Buttons & Animations (on, off, pressed, mouse over states) https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/ Kontakt Scripting Tutorials (KSP), Free Massive Presets, Mixing Tips Fri, 17 Apr 2026 01:57:34 +0000 hourly 1 https://wordpress.org/?v=7.1.3 By: YummyBeats https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9315 Sun, 07 Jul 2024 19:16:30 +0000 https://blog.yummybeats.com/?p=2495#comment-9315 In reply to BR.

EIDT: By “disable” you mean the off state right?

Just use the button’s name to set its state like this:

on init 
	declare ui_button $myButton
	declare ui_button $anotherButton
end on

on ui_control($anotherButton)
	$myButton := 0 {sets $myButton into the off state including the picture state}
	$myButton := 1 {sets $myButton into the on state including the picture state}
end on

In case you really meant disabling a button there is a new article now which explains buttons in detail and also shows various use cases (like toggles, disabled buttons or controlling multiple buttons at once):
various use cases for buttons

]]>
By: BR https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9314 Sun, 07 Jul 2024 15:30:57 +0000 https://blog.yummybeats.com/?p=2495#comment-9314 Hello, how could I toggle a button to make it disable with another button? Like the key switching function. It should be simple, but I cannot find it.

]]>
By: YummyBeats https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9016 Thu, 18 Jul 2019 12:51:47 +0000 https://blog.yummybeats.com/?p=2495#comment-9016 In reply to Dwight.

Have you put the correct text file into your pictures folder? The number of animations needs to be exactly 6 for a button (see instructions above)

Although I beleive this is not the actual problem here: did you keep the exact same distances from one button state to another with your button image? (see the example above) Kontakt devides the total height of your button image by 6 and thats the height of one button state then.

How do you trigger your button actually inside the note on? Maybe you wanna use a label with an overlayed transparent button instead? So that you have more control over the picture states. See this animation tutorial

]]>
By: Dwight https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9015 Thu, 18 Jul 2019 00:46:32 +0000 https://blog.yummybeats.com/?p=2495#comment-9015 The issue I’m having is when I insert my custom button and trigger it with a note, it shows all 6 frames at once. Even though I’ve specified the button size. what am I doing wrong?

]]>
By: YummyBeats https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9007 Fri, 01 Mar 2019 01:04:29 +0000 https://blog.yummybeats.com/?p=2495#comment-9007 In reply to James.

EDIT : Sorry I totally got you wrong first .. the 108 (or 109 to be more precisely) should be fine. The image width is 108px so I actually don’t know why it gets cropped with your setup?!
Did you use another image file or resize this one?

I don’t know if this is a bug with Kontakt or if it has any purpose but yes, you may need to add one more pixel to your actual image size.
In this case it’s 108+1 or 32+1. The +1 was just used to point out this issue more clearly. Of course you can also do $BTN1_X := 109 and don’t need to do this extra addition.

]]>
By: James https://blog.yummybeats.com/ksp-kontakt-scripting/kontakt-scripting-ksp-custom-ui-button-animations-on-off-pressed-mouse-hover-states-kontakt-6-user-interface/comment-page-1/#comment-9006 Fri, 01 Mar 2019 00:26:05 +0000 https://blog.yummybeats.com/?p=2495#comment-9006 Hi, thanks very much for the tutorial!
On line 3 of the {button 1} part, should that number be 180? My button kept cutting off till I changed that!

]]>