Search code examples
flashactionscript-3movieclip

Reducing the hit area on a movieclip button


Hey guys, have a little issue i need to figure out. I created a movie clip button that contains 2 text fields, one static and one dynamic. The dynamic text field holds strings that will vary in length. This MC in general is used as a button so what im trying to do is not have the hit area as large as the length of the text box.

If you go to http://bodog-bonuses.com/mevame/ and click on (takeout > menu) you will see on the menu all the items listed are overlapping onto the picture, i want to limit the hit area so that does not happen. I cannot shorten the MC because it will vary in length, and if it does become that long then that portion should not be clickable.

Any help is appreciated, thank you.


Solution

  • I don't see the problem you are describing, however combining a maximum set width to the TextField with TextFieldAutoSize.LEFT applied to the autoSize property of the TextField should allow the button to grow vertically as needed without overlapping over the image horizontally.