Reputation: 101
Is it possible to embed StageText within a MovieClip?
I've added about 20 instances of StageText to a page (each page is a MovieClip), and I was hoping to have all these text fields move, fade, etc. along with the MovieClip. Right now when I fade the MovieClip out, the StageText remains and I have to remove them individually by script.
Here's an example of the code I'm using to add the StageText
var textField1:StageText = new StageText();
textField1.softKeyboardType = SoftKeyboardType.PUNCTUATION;
textField1.returnKeyLabel = ReturnKeyLabel.GO;
textField1.stage = this.stage;
textField1.viewPort = new Rectangle(800, 200, 100, 30);
textField1.text = String(0);
I'm thinking it would have something to do with the stage = this.stage; line or perhaps the viewPort, but there isn't much information on Google about StageText so I can't find anything on that.
Upvotes: 3
Views: 563
Reputation: 14406
No. I think they are just overlayed overtop of your flash content: http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/text/StageText.html
"When native inputs are used, StageText objects are not display objects and you cannot add them to the Flash display list. "
Upvotes: 1