Skip to main content
Participant
August 7, 2009
Answered

Can I insert a swf file in the middle of a TLF?

  • August 7, 2009
  • 1 reply
  • 1522 views

I'm building a flex  application that will allow users to add content (text, images, swf, mp3,  etc...) The same idea as the way we work with the Flex  Builder, that is, we can add many components in the editor area.

I then created the  application framework and I'm using TLF. However, TLF does not allow me to add a  swf file or even a button in the middle of the text area. Is there a way to work this  out?

What's the best way  to accomplish an aplication like this?

This topic has been closed for replies.
Correct answer Abhi.G.

Hi,

If you want the .swf to appear inline with the text, you can use an InlineGraphicElement. Set the path to the .swf as the source of the InlineGraphicElement.

Abhishek

(Adobe Systems Inc.)

1 reply

Abhi.G.Correct answer
Participating Frequently
August 7, 2009

Hi,

If you want the .swf to appear inline with the text, you can use an InlineGraphicElement. Set the path to the .swf as the source of the InlineGraphicElement.

Abhishek

(Adobe Systems Inc.)

Participating Frequently
August 7, 2009

Whatnick, when you talk about adding something in the middle of the text, do you mean as something that flows along with the text (i.e. moves as you insert and delete text around it) or as something that stays fixed and the text flows around it?

Also, I think that InlineGraphicElements are intended as non-interactive graphics. If you are using Flex, I'll bet that something like a Button or a SWF with mouse and keyboard interactions won't work correctly... it won't know about Flex's FocusManager, for example.

If you really need interactivity, I think you'[ll need to make the interactive component a sibling of the text component -- i.e., so that both of them are regular Flex components inside a regular Flex container -- but position it on top of the text at the appropriate location. You might be able to use a non-interactive InlineGraphicElement inside the text as a placeholder, determine where it has been laid out, and then position the interactive sibling on top of it.

Gordon Smith

Adobe Flex SDK Team

August 13, 2009

Hi Gordon,

I asked a related question here.

http://forums.adobe.com/thread/476777

Thanks, Philip