How about setting buttonMode and mouseChildren properties true?
I tried but it doesn't seem to help.
Any other idea of what could be the problem ?
Ok guys I found the answer, and I thought of sharing
The mistake is rather subtle.
These 2 lines are the cause:
htext.textFlow = new TextFlow(); htext.textFlow.addChild(p);
To produce working code, they have to be replaced by:
var tf:TextFlow = new TextFlow(); tf.addChild(p); htext.textFlow = tf;
As about why is that different: I believe it's due to setters.
Nice to know. Thanks for the solution.