开发者

Open custom IE window from Flex or Can a window customize itself?

Is it possible to open a custom IE window (i.e no status bar or address bar etc) from within flex? o开发者_运维百科r if i call a php file or html file can the page customize itself when loaded?


you can call a php or html file using HTTPService.

import mx.rpc.http.HTTPService


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

php or html

<?php

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


?>

Please check for minor error.

Hope this help


JavaScript inside the HTML page that the Flex application resides..

<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>

And the flex function called when the button is clicked...

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜