Search code examples
actionscript-3dynamic

Create a dynamic table in As3


I need to create a table within a dynamic text box in a media piece. I am aware that html can be used to create the table but I am not sure how to go about it. Throughout the piece the user is inputting text answers which are then stored as variables. My problem is that I can't find anywhere that mentions how to create a table in a dynamic text box that will display the user inputted text from before. What am I missing?


Solution

  • As you observe from the following part of ActionScript 3 API Reference by Adobe, you cannot insert tables into text fields:

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlText

    The table tag, as we know it from HTML, is simply not supported. You will have to resort to implementing your own table rendering system and integrate it into your already existing context using flash.text package which provides some advanced text rendering and measuring capabilities.