【发布时间】:2009-11-11 00:21:13
【问题描述】:
是否可以在 flex 中打开自定义 IE 窗口(即没有状态栏或地址栏等)?或者如果我调用一个 php 文件或 html 文件,页面可以在加载时自定义吗?
【问题讨论】:
标签: php javascript html apache-flex
是否可以在 flex 中打开自定义 IE 窗口(即没有状态栏或地址栏等)?或者如果我调用一个 php 文件或 html 文件,页面可以在加载时自定义吗?
【问题讨论】:
标签: php javascript html apache-flex
您可以使用 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>";
?>
请检查小错误。
希望有帮助
【讨论】:
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);
}
【讨论】: