# Fill a shape with text

**URL:** <https://forum.kirupa.com/t/fill-a-shape-with-text/315474>\
**Category:** flash\
**Created:** [October 27, 2010, 9:10am UTC](https://forum.kirupa.com/t/fill-a-shape-with-text/315474 "2010-10-27T09:10:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amietbeach](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@amietbeach](https://forum.kirupa.com/u/amietbeach)\
**Post date:** [October 27, 2010, 9:10am UTC](https://forum.kirupa.com/t/fill-a-shape-with-text/315474/1 "2010-10-27T09:10:30Z")

</div>

Hi,

I’m trying to fill shapes with text.

These shapes are pretty complex (i.e. they’re not square, see image below).

So far, I place textfields manually on the stage and populate them one by one with strings (names) stored in an array. (The textfields are also in an array).

The example below is very simple and I will probably have to setup a good few hundred textfields in the final project.

Would anyone know of a way of populating these textfields dynamically according to an underlying shape?

Or maybe a different approach altogether?

I was thinking collision detection might be an idea but not sure where to start.

Any thoughts?

Thanks!

PS: I **cannot** simply use a mask over the chunk of text as **each character shall be visible** within the shape.

![]()
