[Raghu]FLEX – i – FRAME

One of the biggeset pain points of FLEX/Flash (as i see it) is its inability to render HTML in its totality. FLEX supports a few HTML Tags, but not all.

The trick is very simple. Its just a clever use of the External API interface that lets the Actionscript inside a Flash movie, talk to the Javascript inside the html (in which it is embedded). In this case, the approach is to let the javascript position an IFrame on top of a specific area of your Flex application to provide a container for the HTML content which will then appear embedded in the application.

The IFrame component extends Canvas and is used like any other Flex container. Behind the scenes, it acts as a proxy for the actual HTML IFrame. For example, when the IFrame component is resized or moved it automatically asks the HTML document to resize/move the actual IFrame. You can easily find the ExternalInterface calls in IFrame.mxml and the corresponding JavaScript functions in iFrameDemo.html (renamed to iFrameDemohtml.mxml for reading purposes).

But what kind of surprised me was the amazing perfomance of the History Managemet API. While still within the FLEX Application, you can use the browser back button to navigate to earlier pages… really NEAT !!!

[ Read More | Demo ]

6 Responses to [Raghu]FLEX – i – FRAME

  1. mujib says:

    Please provide the link page or detail information about Iframe /flex so that we can embad HTML pages using flex.

  2. Kumaran says:

    can you please elaborate what you exactly need?

  3. Hi Kumaran, I’d like to know how could I do that exactly, because when I try to use the example I saw on the internet about the i-frame, something appears to be missing because I didn’t see anything there.
    Would please send me the link, the link I’m using looks easy but when I try to implement it , it is very obscure for me.

    This is the link I’m using right now.

    http://www.themidnightcoders.com/blog/2006/12/mixing-html-and-flex-using-iframe.html

    Regards

    I hope you could help me out.

    Gustavo

  4. Greg says:

    Hi, Kumaran!

    I was reading your post and wondered if you could provide a solution.

    My question is:

    How can a Flex pop-up with an embedded html page move without leaving behind the html page?

    I have yet to find an answer and would appreciate your kind reply.

    Thank you!

  5. jp says:

    Hi Greg,
    I have the same issue of moving the iframe.

    Did anybody figure out?

  6. Hello! Great stuff, please do inform me when you finally post something similar!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: