Skip to main content
Known Participant
July 26, 2010
Question

Image that spans multiple containers

  • July 26, 2010
  • 1 reply
  • 628 views

I have a requirement where I need an image to span multiple pages.  So, if I had a half page of text and an image that has a height of 1 page.  Instead of it just being placed on the next page I need it to display as much as it can on the first page then put the rest on the next page.

Any suggestions how I would go about doing this?

On a totally different note, I really want to thank everyone that has worked on TLF.  I know how much it stinks to work on something so hard and put everything into it only to have people tell you where it falls short.  The company I work for 100% depends on what you have created and I don't think there is any way we could have used Flex for our product if we didn't have TLF and its extensibility.  Also, thanks for continuing to work on the framework to make it better and more efficient and take requests from a development community that I know isn't the most grateful. 

Joel

This topic has been closed for replies.

1 reply

Adobe Employee
July 28, 2010

Thanks for your kind words! They are much appreciated.

As regards having a single image span two containers; that seems difficult. The best I can think of is to actually include two copies of the image. If you are using TLF 2.0, you can set a negative padding on the bottom of the first, and a negative padding on the top of the second. The tricky part is going to be figuring out what padding to apply. You will have to compose it once, and see if the image spans the containers, and therefore needs to be doubled. For that you will want to be conversant with the difference between compose and update. Compose just calculates all the text breaks, where update does a compose if necessary and also adds things to the display list and rerenders. For your calculations, you can use compose until you've got everything set up correctly, and then do update. And I think you will want to clip the Sprite that is serving as the container for the TextLines (the container of the ContainerController or TextContainerManager).

Hope this helps,

- robin