Is it possible to open a custom IE window (i.e no status bar or address bar etc) from within flex? or if i call a php file or html file can the page customize itself when loaded?
+1
A:
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
Treby
2009-11-11 02:14:37
Hi Treby, i am not quite sure how a POST method to a PHP file would work... that php code called in a browser works but not in the Flex code. I have done further research and believe i should be able to put javascript into the Flex using the ExternalInterface function but not sure on that either.
medoix
2009-11-11 06:52:19
you can disregard the method="post" just put the url path either php or html. while in the html side, u just put the code in <body onload="window.open('url path','mywindow','width=400,height=200,scrollbars=no, toolbar=no,menubar=no')" >
Treby
2009-11-11 07:03:19
A:
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);
}
medoix
2009-11-11 23:05:48