|
|||
|
FFish Script does not provide any method to open a popup browser window. However, it can be done by the WebBrowser control:
Firstly let's create a hidden browser window and open a blank window: Code:
var var1 = createControl("Shell.Explorer.2", 0, 0, 0, 0);
var1.activex.navigate2("about:blank");
Code:
var window = null;
var1.activex.NavigateComplete2 = function (obj, url)
{
* * *var doc = obj.document;
* * *window = doc.parentwindow;
}
Now we can open the popup window: Code:
var pop = window.open("about:blank", "preview",
* * * * *"height=400,width=550,status=yes,toolbar=no,scrollbar=no,menubar=no,location=no", false);
* *pop.document.write(html); * * *
If you want to open a popup window without borders, you can use the method introduced by http://www.jsmadeeasy.com/javascript...splashwin.html Here is the code taken from the site, we made a little changes to make it work in FFish Script Code:
function launchSplashWin(contentType, contentString, width, height, left, top)
{
* * *var w = window.screen.width;
* * *var h = window.screen.height;
* * *var l = (left != null) ? left : (w - width) / 2;
* * *var t = (top != null) ? top : (h - height) / 2;
* * *
* * *var uri = (contentType.toLowerCase() == "uri") ? contentString : "about:blank";
* * *
* * *var splashWin = window.open(uri, '_splash', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0', false );
* * *splashWin.blur(); * * *
* * *window.focus();
* * *
* * *splashWin.resizeTo(width,height);
* * *splashWin.moveTo(l, t);
* * *if (contentType.toLowerCase() == "string")
* * *{
* * * * * *var swd = splashWin.document;
* * * * * *
* * * * * *swd.write(contentString);
* * * * * *swd.close();
* * *}
* * *splashWin.focus();
}
We made a demo to preview the main movie in the popup window: 1. * * *Prepare a string contains the HTML codes Code:
var str = '<HTML><HEAD><meta http-equiv=Content-Type content="text/html; *charset=GB2312">'; * * *str += '<TITLE>Preview</TITLE>'; * * *str += '</HEAD>'; * * *str += '<BODY bgcolor="#FFFFFF">'; * * *str += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'; * * *str += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'; * * *str += 'WIDTH="550" HEIGHT="400">'; * * *str += '<PARAM NAME=movie VALUE="SWF_NAME">'; * * *str += '<PARAM NAME=quality VALUE=high>' * * *str += '<PARAM NAME=bgcolor VALUE=#FFFFFF>' * * *str += '<EMBED src="SWF_NAME" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"'; * * *str += 'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>'; * * *str += '</OBJECT></BODY></HTML>'; var movie = getMovies()[0]; var html = str.replace(/SWF_NAME/g, movie); Code:
var pop = window.open("about:blank", "preview",
* * * * *"height=400,width=550,status=yes,toolbar=no,scrollbar=no,menubar=no,location=no", false);
* *pop.document.write(html); * * *
|
|
|||
|
ok... we know how to open a browser window. as you described. but what if i want to do this all in the IE object which lies in the current project of mine?.. well... for somereason i've to display results in html format within my running project. how is it possible? any suggestion?
i would appriciate if you clear it with an example. regards
__________________
SWFBaz Preview [October 2006] http://www.SWFBaz.com |
|
|||
|
one more thing... although i 've not checked it at the moment... but want to ask you first. i.e... if i load a page in tiny browser. and that page contains a swf movie played in it. is it possible to invoke swfkit scripts from that embeded file?
regards
__________________
SWFBaz Preview [October 2006] http://www.SWFBaz.com |
|
|||
|
Hello Support Team,
Even I am need of something like this. Somehow (Using your help only) I could able to open HTML Page within my Final EXE. Now, what I want is, some values from that HTML Page to be transferred to main Application. Please guide us how to achieve this ? Thanking you in advance for any such help in this direction. Regards -Bhavesh Savla |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|