Hi All,
   I have an use case where any HTML page e.g. google.com is embedded inside 
Flex Application using IFrame and i have a Flex Menu Bar over the IFrame. 
Requirnment is when i select a Flex menu, menu items should roll over the HTML 
Page. 
 Is it Feasible and how we can do that?  
 
I tried as below but Menu Items goes behind IFrame and not visible.
 
 
IFrameDemo.mxml
-----------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
xmlns:local="*"
creationComplete="init();" 
viewSourceURL="srcview/index.html"> 

<mx:Script>
<![CDATA[

import mx.events.MenuEvent;
import mx.controls.Alert;
import mx.collections.*;

[Bindable]
public var menuBarData:XMLListCollection;

private var menubarXML:XMLList =
<>
<menuitem label="Flex Resources" id="Favorites" data="top">
<menuitem label="Flex Developer Center" 
path="http://www.adobe.com/devnet/flex/"; data="1A"/>
<menuitem label="Flex Team Blog" data="1B" 
path="http://weblogs.macromedia.com/flexteam/"/>
</menuitem>
<menuitem label="Search" data="top">
<menuitem label="Google" data="2A" path="http://www.google.com"/>
<menuitem label="Yahoo" data="2B" path="http://www.yahoo.com"; />
</menuitem>
</>;

private function init():void
{
iFrame.visible=true;
menuBarData = new XMLListCollection(menubarXML); 
}
]]>
</mx:Script>
<mx:HBox width="100%" height="100%">

<mx:Panel title="Flex-iFrame" width="100%" height="100%" 
roundedBottomCorners="true">
<mx:MenuBar id="tree" width="100%" height="30" dataProvider="{menuBarData}"
labelField="@label" showRoot="false"
change="iFrame.source = event.it...@path" />

<local:IFrame id="iFrame" source="http://www.adobe.com/devnet/flex/"; 
width="100%" height="100%"/>
<mx:ControlBar>
<mx:CheckBox id="cbVisible" label="IFrame Visible" selected="true" 
click="iFrame.visible=cbVisible.selected"/>
</mx:ControlBar>
</mx:Panel>

</mx:HBox>
</mx:Application>
----------------------------------------------------------------------------------------------------------------
 
   
-Sachin


      

Reply via email to