问题
i have a flex project that runs in using flash player 11. What i am trying to achive is to have a tab of my project which, when loaded displays a web page within the tab. I do not want to naviagate away from my project but display it within my tab layout. Is this possible? i have found plenty of info on how to do this using air but nothing with regards to my flex project not using air.
thanks
回答1:
No, this isn't directly possible. The HTML
and StageWebView
components would do the trick, but they're AIR-only.
What you can do is call a javascript function using ExternalInterface
to load your desired web page in an iframe positioned above your Flex area.
See Div above iframe with flash content for more info on putting an iframe above your flash content area.
回答2:
if you have to do, try to use flex-iframe, but is not a good way to use iframe in flex, it will have many mask problems.
来源:https://stackoverflow.com/questions/24144013/display-and-navigate-a-web-page-from-a-flex-tab