Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2007, 04:59 AM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default If user moves window then closes app, will it keep its position on next run?

If the user moves the window to the place of there choice then the app is closed, when it is next run can it appear in it's last position?
Reply With Quote
  #2 (permalink)  
Old 12-07-2007, 07:28 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: If user moves window then closes app, will it keep its position on next run?

Yes, swfkit will remember the last state of a window.
Reply With Quote
  #3 (permalink)  
Old 12-07-2007, 04:49 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: If user moves window then closes app, will it keep its position on next run?

How can I make it do this? Please! I really need to know!
Reply With Quote
  #4 (permalink)  
Old 12-09-2007, 09:31 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: If user moves window then closes app, will it keep its position on next run?

1. handle the onClose event of the main window to store its size and position
Code:
getMainWnd().onClose = function () {
  var x = this.left;
  var y = this.top;
  var w = this.width;
  var h = this.height;

  writeProfile(...)
  ...
}
2. load the last position and size of the main window in the first frame by calling a fscommand. e.g fscommand("ffish_run", "restore"); and in swfkit add a "restore" script
Code:
var x = parseInt(readProfile(...));
...

if (x <0 || x > SysInfo.displaySetting.pelsWidth) return;
if (y ...) return;

var wnd = getMainWnd();
wnd.move(x, y, x+w, y+h);
Reply With Quote
  #5 (permalink)  
Old 12-10-2007, 02:13 AM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: If user moves window then closes app, will it keep its position on next run?

What do I add to these scripts? They won't work. Where should they be put exactly?
Reply With Quote
  #6 (permalink)  
Old 12-10-2007, 01:01 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re: If user moves window then closes app, will it keep its position on next run?

i made you a sample with the information of swfkits reply
Reply With Quote
  #7 (permalink)  
Old 12-10-2007, 02:17 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: If user moves window then closes app, will it keep its position on next run?

Thanks meester! It works now.
Reply With Quote
  #8 (permalink)  
Old 12-10-2007, 04:24 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: If user moves window then closes app, will it keep its position on next run?

meester, I revise that. It is NOT working. I tried to apply it in the same ways you had, and it wouldn't work. Can I give you or Swfkit the skp and you guys fix it?
Reply With Quote
  #9 (permalink)  
Old 12-10-2007, 06:08 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re: If user moves window then closes app, will it keep its position on next run?

sure, you can mail it to me and I'll take a look at it.

btw: did you include the fscommand on the first frame of your swf-movie
Code:
fscommand("ffish_eval","Restore()")
Cause that's the code that calls the swfkit script
Reply With Quote
  #10 (permalink)  
Old 12-10-2007, 06:19 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: If user moves window then closes app, will it keep its position on next run?

Yes, I included it. I'll email you the files.
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 04:41 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.