Sunday, March 28, 2010

Can I insert a swf file in the middle...

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.

Can I insert a swf file in the middle...

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.)

Can I insert a swf file in the middle...

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

Hi Gordon,

I asked a related question here.

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

Thanks, Philip

  • lipstick
  • No comments:

    Post a Comment