'Embedding HTML in a Flex application using an IFrame'에 해당되는 글 1건

  1. 2013.03.28 Embedding HTML in a Flex application using an IFrame
00.Flex,Flash,ActionScript2013. 3. 28. 18:36
반응형

Finally Updated: Embedding HTML in a Flex application using an IFrame

I've updated to Flex 2 (and which can also be used in Flex 3) the code by Christophe Coenraets for embedding HTML in a Flex application using an iframe.

You can see a demo of it here.

You can download the code here.

To run locally, first compile IFrameDemo.mxml. If you are using Flex Builder, unclick "Generate HTML wrapper file" in the Flex Compiler settings before publishing, since there is an existing HTML wrapper. After this, you can view IFrameDemo.html. If you get a "Security sandbox violation" error, you need to put the IFrameDemo directory in the local-trusted sandbox. See the Flex documentation for information on updating FlashPlayerTrust files.

There's been some comments below that say these instructions are no longer valid in Flex Builder 3. So check out the comments if these instructions don't work for you.

The one cause for limitations in this code is the use of opaque for wmode. I've seen reports of tabbing problems in the player, and running more than one player when using opaque wmode seems to degrade performance.

Check below the ad for some very important updates. The comments also have a lot of excellent details in them.

Update 1: see this post for an update to the code that needs less HTML changes, allows multiple HTML pages to be referenced at once, and controls the HTML visibility as needed.

Update 2 (an important update that I highly suggest you read): for my new views on iframes and Flex, read my post from July 2008: Don't Use IFrames for HTML in Flex

Posted by 1010