Skip to main content
Participant
April 24, 2019
Question

How to set mask for TextInput?

  • April 24, 2019
  • 2 replies
  • 435 views

Some "TextInput components" are in any movieclip, and this movieclip is masked by some movieclip.

In HTML5 product, these "TextInput components" becomes "Input" tagging elements.

Sometimes some "Input" elements are in masking area, and some "Input" elements are out of masking area.

How can I hide "Input" elements that are out of masking area?

In flash, it's so easy, but in HTML5, I don't know how to make masking source for "Input" elements.

Who has a solution? Or it's not possible?

I think of using one input field and pass value, but to fix huge huge files, (or to give it up) I'm searching the EASY solution.

Please, help me. I miss Actionscript, very much...

This topic has been closed for replies.

2 replies

Legend
April 24, 2019

You can't mask any Canvas components, because they're not rendered to the canvas. They float above it in the browser DOM.

Participant
April 25, 2019

Thank you very much for your reply. Maybe I've to start plan B...

avid_body16B8
Legend
April 24, 2019

this.textfield.visible = false; // hides  make sure this is the correct scope.

If you use in the first frame the code below

var root = this;

then you can use:

root.textfield.visible = false;

Then when you want to show them use:

root.textfield.visible = true;