Skip to main content
Inspiring
July 10, 2009
Answered

M.c. that is a button, with text over the top.

  • July 10, 2009
  • 1 reply
  • 807 views

I have a m.c. that i have truned into a button. However i have dynamic text overlayed over the top. Becuase the text is going over the top of the button, it stops the button from working... is there a way to make it so that the text is still ontop of the button but does not effect its functionality?...

Please note i have set the dynamic text to non selectable incase this is stopping the button underneath from working (but still doesnt work).

thanks to any responders.

This topic has been closed for replies.
Correct answer kglad

assign your textfield's mouseEnabled property to be false:

tf.mouseEnabled=false;   // if tf is the correct instance name.

1 reply

kglad
Community Expert
Community Expert
July 10, 2009

make the text a child of the button and use:

btn.mouseChildren=false;  // where btn is your button's instance name.

Inspiring
July 10, 2009

Thanks Kglad, but unfortunatley i can't do this becuase the button is changing size... Therefore by making it a child of this button means that the size of the text is also changing... is there not a way of making a text field have no weight as it were.. if the text box is static text then the button still works... so there should be a way to make it have the same state when it is dynamic text.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
July 10, 2009

assign your textfield's mouseEnabled property to be false:

tf.mouseEnabled=false;   // if tf is the correct instance name.