Flex 2 and IFrames
Christophe Coenraets did a Flex and IFrame example a while back. His code was before Flex 2 was release and it was never updated. I have updated the code, in connection with my last post about Flex Search mashup.
Here is the original post/code:
http://coenraets.com/viewarticle.jsp?articleId=95
You can find the newer IFrame at
http://renaun.com/flex2/posts/flexsearch/index.html
I had to change the normal Flex 1.5 to Flex 2 release stuff, like V(v)oid and property compiler error fixes. But the way the class talks to JavaScript was a little more, I changed out the getURL method of talking to JS and used the newer ExternalInterface. It was quite simply and a lot cleaner way of talking the JS on the page, that ends up talking to the IFrame.
I also added two bindable properties to the class, globalX and globalY. I used this to put buttons around the x,y of the IFrame. This is because the IFrame sits on top of the Flex app so you can’t put buttons on top of the IFrame but you can position them close by so I needed the coords.
Well have fun and enjoy.
PS: I was informed that Brian Deitte had done a port already, well now there are two they came out about the same so thats a good thing.
http://www.deitte.com/IFrameDemo3/srcview/index.html