Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-08-2006, 04:30 PM
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default Preview In Screensaver

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.
Reply With Quote
  #2 (permalink)  
Old 11-08-2006, 06:47 PM
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default Re:Preview In Screensaver

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;
Reply With Quote
  #3 (permalink)  
Old 11-09-2006, 02:50 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Preview In Screensaver

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).
Reply With Quote
  #4 (permalink)  
Old 11-09-2006, 05:51 AM
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default Re:Preview In Screensaver

You may download file from:

http://www.aquarium-3d.com/garph/Autumn.scr
Reply With Quote
  #5 (permalink)  
Old 11-09-2006, 03:21 PM
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default Re:Preview In Screensaver

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
Reply With Quote
  #6 (permalink)  
Old 11-10-2006, 02:06 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Preview In Screensaver

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(); 
}
Second, in the preview mode call the function at every second
Code:
   if(commandItem1.charAt(1) == "p") {
      ...
      ...
      m.parent = w;
      Application.SizeAndPos.setCustomSizeAndPos(0, 0, w.width, w.height);
      Application.setInterval(CheckState, 1000, w, m);
      
   }
Reply With Quote
  #7 (permalink)  
Old 11-11-2006, 06:55 PM
Junior Member
 
Join Date: Nov 2006
Posts: 6
Default Re:Preview In Screensaver

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);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:58 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.