从Flex打开自定义IE窗口或窗口可以自定义吗?

时间:2009-11-11 00:21:13

标签: php javascript html flex

是否可以从flex中打开自定义IE窗口(即没有状态栏或地址栏等)?或者,如果我调用php文件或html文件,页面可以在加载时自定义吗?

2 个答案:

答案 0 :(得分:1)

您可以使用HTTPService调用php或html文件。

import mx.rpc.http.HTTPService


<mx:HTTPService method="post" url="{php path}" resultFormat="e4x" ShowBusyCursor="true" />

php或html

<?php

echo "<script>window.open('url path','mywindow','width=400,height=200,scrollbars=no, toolbar=no,menubar=no')</script>";


?>

请检查是否有轻微错误。

希望这个帮助

答案 1 :(得分:0)

Flex应用程序所在的HTML页面内的JavaScript ..

<script language="JavaScript" type="text/javascript">
function images(url) 
{
 var width  = 700;
 var height = 500;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'Screenshots', params);
 if (window.focus) {newwin.focus()}
 return false;
}
</script>

单击按钮时调用flex函数...

private function imagesButtonClick():void {
    var url:String = data.images;
    ExternalInterface.call("images", url);
}