views:

359

answers:

3

I need to distribute a flash-based application to end users. I have a very simple index page to launch another window:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL, w, h) {
win=window.open(URL,"window","menubar=no,width=" + w + ",height=" + h + ",toolbar=no,resizable=no;titlebar=no");
self.close();
}
</script>
<BODY onLoad="javascript:popUp('flash.html', 1024, 768)">
</BODY>
</HTML>

And the flash-only page is like

<html>
<head><title>Applet<title></head>
<body>
 <object width="1024" height="768">
 <param name="movie" value="somefilename.swf">
 <embed src="somefilename.swf" width="1024" height="768">
 </embed>
 </object>
</body>
</html>

This flash application has fixed dimension: 1024x768 and it is embedded in a non-resizable browser window.

I create a desktop icon for the starting page and end-users can double-click this icon to start the application. After the ActiveX warnings, the flash application can start nicely and everythin work fine.

The problems I need to resolve are: (1) The starting page does not closed by itself automatically (it will ask whether you want to close it or not). (2) ActiveX warning. As I think it is normal, but end-users do not think so.

Is any Windows executable file can start a fix-size IE browser with content in local harddrive ?

A: 

Include the Mark of the Web in the HTML to allow script and plugin content on IE.

Use window.resizeTo to change the size of the current window rather than attempting to open a new one and close the old one.

bobince
+1  A: 

bobince has the right tool, but links to an answer with the wrong argument. You actually need <!-- saved from url=(0016)http://localhost -->. (See also my earlier answer.)

MSalters
A: 

Thanks for the advice of using MOTW. It works in certain way that I can launch a local html file without ActiveX warning. However, I need to open a non-resizable menu-less browser to start my swf application.

I found a solution for my case...I change this html page to a HTA application (change the file extension from html to hta, add some hta-specific syntax). End-users can start the application by double-click start.hta and it just looks like a normal Window application to them.

SYMPLIK