Flex中使用IFRRAME以调用外部网页使用注意事项?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application ....>
<mx:Script>
<![CDATA[
protected function panel_mouSEOver(event:MouseEvent):void{
iframhideshow(1);
}
protected function panel_mouSEOut(event:MouseEvent):void{
iframhideshow(-1);
}
private function iframhideshow(val:int):void{
ExternalInterface.call("eval","(function(){document.getElementById('map0').style.zIndex='"+val+"';})()")
}
]]>
</mx:Script>
<s:Group mouSEOver="panel_mouSEOver(event)" mouSEOut="panel_mouSEOut(event)" x="406" y="126">
<flexiframe:IFrame source="http://ditu.aliyun.com"
id="map"
label="map"
width="740"
height="370" />
</s:Group>
</mx:Application>
Html代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>${title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html,body { height:100%; }
body { margin:0; padding:0; overflow:auto; text-align:center;
background-color: ${bgcolor}; }
#flashContent { display:none; }
</style>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}_ie" name="${application}">
<param name="movie" value="${swf}.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="${bgcolor}" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent">
<embed id="${application}_ff" name="${application}" src="${swf}.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="${width}" height="${height}" wmode="transparent"></embed>
</object>
</body>
</html>