Text and button problem

I have created a text and placed it on a button, now the button doesn´t work when the cursor is over the text. I know that the text can be created through the button properties, but I had to do it that way because of other purposes. Now, is there a code that can make the text transparent for the click, mouseIn, mouseOut events etc.?

I think this will not work. You can try to hide the text, or to collapse it.
But i still do not understand why you use a textfield in front of a button?

Which purposes are the reason for this?

What you could do is to set the opacy to 0 so that the button is completely transparent. Put the button with —> STRG+SHIFT+ ARROW-UP (CRTL+SHIFT+ARROW-UP) to the front and put your text with the key-combination —> CRTL+SHIFT+ARROW-down, behind the transparent button.

This could work (i think).

Thank you for the answer!
So the idea behind this was to make the text over the button disappear as I moved the cursor over it, and show when I moved the cursor out. I´m a novice when it comes to coding so the only way for me to achieve that was to use a separate textfield and use this code:


export function button1_mouseIn(event) {
    $w('#text1').hide ()
}

export function button1_mouseOut(event) {
    $w('#text1').show ()
}

But I´m sure there is a way to achieve the same effect without using the textfield, I just don´t know how. I would love to hear from you if you have any ideas!

@wamblee97

export function button1_mouseIn(event) {$w('#button1').label=""}
export function button1_mouseOut(event) {$w('#button1').label="BUTTON-LABEL"}