|
|||
|
Hello.
I try to create screensaver from .exe file. But I have some problem with it: When we select a screensaver, a screensaver process is started and the preview is displayed in the property window. That behavior is normal. However, when I switch to a different screensaver in order to view a different preview, the screensaver process is not terminated. Therefore, if I switch between 3 screensavers, will have 3 process running until I close the display property window. What can I do with It. I try to compile as .scr file, but I need custom Setting Box menu. |
|
|||
|
Or may be any body know how make custom setting, when I compile as screensaver.
I use SWFKit Pro 3. This is script from Initialize: //Initialize var tst = new RegKey("HKCR\\http\\shell\\open\\command"); def_br = tst.getValue(); def_br = def_br.data; if(def_br == "" || def_br == undefined) { tst = new RegKey("HKCR\\HTTP\\shell\\open\\command"); def_br = tst.getValue(); def_br = def_br.data; } var reg_root = "HKLM\\Software"; var reg_sub = "TRATATA"; var reg_name = "SCREENSAVER"; var reg_path = reg_sub+"\\"+reg_name; var fullVersion; var URLsuffix; var PlayMode; var tst = new RegKey(reg_root+"\\"+reg_path); install_path = tst.getValue("InstallationPath"); install_path = install_path.data; var commandItem1 = Application.cmdItems[0].toLowerCase(); if(commandItem1.charAt(1) == "c") { PlayMode="settings"; Application.Appearance.windowShape = $WSTRANSPARENT; Application.onGetMovie = function (movie) { movie.value = getAdditionalFile("Settings.swf"); return true; } Application.Appearance.caption = "Screensaver Settings"; Application.Appearance.icon = getAdditionalFile("ww_settings.ico"); return true; } else { if(commandItem1.charAt(1) == "p") { PlayMode="preview"; Application.Appearance.borderStyle = $BSNONE; Application.Appearance.borderIcons = 0; var handle = parseInt(Application.cmdItems[1]); var m = getMainWnd(); var w = new Window(handle); var ws = w.getChildren(); for(i=0;i<ws.length;i++) { if(ws[i].caption == reg_name) { ws[i].bringToTop(); return false; } } m.parent = w; Application.SizeAndPos.setCustomSizeAndPos(0, 0, w.width, w.height); } else { PlayMode="play"; Application.Interaction.bDisableAltTab = true; Application.Behaviour.bAlwaysOnTop = true; Application.Appearance.borderStyle = $BSNONE; Application.Appearance.borderIcons = 0; var ds = SysInfo.displaySetting; var wnd = getMainWnd(); Application.SizeAndPos.setCustomSizeAndPos(0,0,ds. pelsWidth,ds.pelsHeight); wnd.bringToTop(); Application.setFocus(); var fp = FlashPlayer.window; fp.onLeave = function () { fp.bringToTop(); wnd.bringToTop(); Application.setFocus(); } } function StringBuffer(length) { this.value = new StringStream; for (var i = 0; i < length; i++) this.value.put('0'); } fullVersion = 0; URLsuffix = ""; Application.onGetMovie = function (movie) { movie.value = getAdditionalFile("input_reg.swf"); return true; } return true; } return true; |
|
|||
|
Hi,
in swfkit pro 3, the "onGetMovie" event handler is unnecessary, because the main movie is always in the resource list and movie list in swfkit 2 no longer exists. With only the code of your project we have not found out the reason of the mentioned problem, so could you please send us the scr file? (to support@swfkit.com). |
|
|||
|
|
|
|||
|
Then I try to send you e-mail, I recive answer:
Hi. This is the qmail-send program at mail.topcmm.com. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <support@swfkit.com>: user is over quota |
|
|||
|
It seems that the screen saver property dialog box does not send close message to the preview window. We have not found out the reason yet. However, there is a solution:
First define a function to check how many children windows the screen saver property dialog box has: Code:
function CheckState(wnd, child)
{
// if there are more than one preview window,
// the number of children windows must be greater than 3
// because a swfkit preview window has 2 children windows
// one is the status bar and the other is the flash player,
// plus the main window, there are there windows
if (wnd.getChildren().length > 3) child.close();
}
Code:
if(commandItem1.charAt(1) == "p") {
...
...
m.parent = w;
Application.SizeAndPos.setCustomSizeAndPos(0, 0, w.width, w.height);
Application.setInterval(CheckState, 1000, w, m);
}
|
|
|||
|
Thank you. I have find solution for my problem:
function CheckState(wnd, child) { if (!processMsg()) { child.close(); var wnd = getMainWnd(); wnd.close(); } if (wnd.getChildren().length > 3) { child.close(); var wnd = getMainWnd(); wnd.close(); } } Application.setInterval(CheckState, 1000, w, m); |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|