Avg. Rating 5.0

Problem

I want to create multiple text boxes that are linked together so that when a user is inputting text into the first box and it exceeds that box's fixed size, it automatically flows into a second box somewhere else on the page.

Solution

In Flash CS5 its real easy. (and if you had a chance to grab the labs textlayout classes) or a more visual easy way is using flash cs5 to do it. And if your not running on Flash CS5 you can always download and work with the open source Text Layout Framework that the labs at adobe created (they might take it down at some point so download and save for the future).

Detailed explanation

K this is going to be a short fun one ;)

Flash CS5:

Easy as pie. All you need to do is to create a text field or two and validate there in your textfield properties that its set to be TLF Text create as many textfields as you like. the look and feel of the textfield is a bit diffrent there is a box on the top left and btm right that if you start draging from there a line you can connect the text to other textfileds. really easy and cool.

 

if you want to do it by code and don't care about the visualities check out a article by our lovely admin here ;)

http://cookbooks.adobe.com/post_Generating_a_formatted_TextFlow_Layout_for_plain_t-17740.html

 

Flex and older flash versions:

and if your all about an older flash version check out the open source project , unfortently it looks like adobe toke it down right now but hopfully it will be back as there saying its a technical issue:

 

http://labs.adobe.com/technologies/textlayout/


Problems with the TLF class/layout:

The biggest and only realy major issue i can see with it is that its support for html is a bit buggy. it works nicly as long as you don't encounter html text that end just about when it flows to the next text field its a bit triky but can becomes a pain in the a*$ so i would say try to avoid using fancy html with the TLF if posible and if not enjoy the debuging :P hopfully thats on the radar and will be fixed (yea i know its complicated and better to have something then nothing).

Hapy coding ;)

_
Ben Fhala
Flash/AS3 School || The EventController - open source project || Follow me @02Geek || new! Youtube Channel

P.S. If you want to call my attention to a request
add @ to the title or twitter
my nickname and a link to your post.

P.S.2. If this helped please support by
twittering/rating/commenting
- it keeps me motivated ;) thanks :P


P.S.3. wow you read all the way to here thanks ;)


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes