Search code examples
flashactionscript-3masking

Masked input TextField not showing


I have an empty movie clip(say A) on a layer and then I have masked it with a display object(say a rectangle). Now I have an movie clip(say B) containing a input text field and I am adding this movie clip(B) dynamically in movie Clip(A).

When I compile it, the input text field is taking input for sure, cz I have applied some traces on change event of that field.

But the characters inside the field are not showing up.

I have also embed the character after someone's suggestion, but after that the field is not even getting input.

Hope this clears now.


Solution

  • Try setting the mask at runtime instead of doing it in the timeline.

    myClip.mask = myMask;
    

    http://www.fayazmiraz.com/masking-test-input-fields-in-flash/

    http://www.fayazmiraz.com/masking-test-input-fields-in-flash-example/

    When having these kind of problems it is always nice to draw debug graphics in the same MovieClip so you know that the mask works. This way you can focus on the real problem, in this case the TextField.