Copy link to clipboard
Copied
Hi !
Does anyone here know how to wrap text around an image in TLF ?
Thanks,
Aurélien (France)
Copy link to clipboard
Copied
We don't yet have a text wrap feature in TLF. You can mimic text wrap with multiple linked containers - Robin described the process in this thread: http://forums.adobe.com/message/2705930#2705930
Copy link to clipboard
Copied
I've described text wrapping here: http://e2easy.wordpress.com/2010/02/21/wrapping-text-around-a-giraffe/ and in various related blog posts. You can even download my AIR application and try it out.
The crux of powerful text wrapping (around irregular obstacles) is that it requires you to create single line ContainerControllers. Unfortunately, Adobe provides no API to create a single line ContainerController - and it is very difficult to fight against the default behaviour of TextFlows and ContainerControllers, when there is formatting (like different sized text). While it is possible to trim a ContainerController down to a single TextLine - I haven't found a way to keep it that way.
My advice to anyone doing this from scratch is NOT to use the TLF. If I was starting this project again, I'd build my own framework from flash.text.engine.
Has anyone else solved the single-line TLF problem?
Copy link to clipboard
Copied
I found extending TLF easier than working from scratch. There's too much
overhead you need to recreate if you don't start with TLF, especially if you
want editing/selection/etc capabilities.
I don't have a working version of this because I did it on a beta build and
the release build broke my code
Copy link to clipboard
Copied
I've run into much of the same problem - there is no easy way to write your own composer that give you more advanced wrapping. It looks like TLF has an sub-element to ContainerController called Parcel, but that class, ParcelList and BaseCompose are marked as @private and not fully documented.
Did you get any futher with your project?
See my question: http://forums.adobe.com/thread/953103 for a bit more info.
Copy link to clipboard
Copied
I got quite far with my project. While the TLF threw up some obstacles, I found work-arounds. For a while, it looked like I was going to attract commercial interest and funding. But when that fell through, I couldn't justify the time I was spending on this. So I shelved it. I may turn it into an iPad/Tablet app at some point, but I don't have time in the forseeable future. I'm afraid you can't download the AIR app anymore, but I made some youtube demos.
http://www.youtube.com/watch?v=dtB0QtKiCPs
(btw: Note that Daniel Freeman, and Daniel Freiman are two different people)
Copy link to clipboard
Copied
Did you end up with creating ContainerControllers for each line? Sounds like it could get processor intensive. The demo looks very impressive.
Freeman/Freiman. Yes, that did confuse me when I started searching for TLF + wrapping. Strange coincidence
Copy link to clipboard
Copied
For text wrapping around rectangular images (not rotated), my algorithm works just like the picture you presented. But with non-rectangular boundaries, I do indeed use a ContainerController for each line. It IS intensive. I wanted to be able to move images around, and have the text flow around the image while it was in motion. But I had to abandon this scheme because the page refresh was taking too long.
Copy link to clipboard
Copied
This is really an old thread. Since 2.0, TLF has "float" format for some simple cases. For cases like non-rectangular boundaries, developers are supposed to create CC for each block, even each line.
Copy link to clipboard
Copied
It's old, but the there is still no proper solution. Floats are different from text wrap (as InDesign implements it). Using a CC for each block will either give inaccurate line-heights (see http://forums.adobe.com/thread/953103 ) or be very slow as text would have to be reflown once pr. line to check height.