Snippet | Utilizando o Hand Cursor sobre botões com texto dinamico!

Um pequeno snippet rapidinho!

Quando um botão é criado dinamicamente em cima de um movieclip, com um textfield sobre ele, o flash não reconhece a area do movieclip como status de over, ou seja, ele não aparece a maozinha, como visto no exemplo abaixo:

 
hit.buttonMode = true;
hit.useHandCursor = true;
 

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

para resolver isso basta ajustar com o seguinte código:

 
hit.mouseChildren = false;
 

e prontinho:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

isso ai!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists

Tags: , , ,

Leave a Reply