Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2007, 12:56 AM
Junior Member
 
Join Date: Feb 2007
Posts: 2
Default noobie question- autoclose exe?

Hi folks,

Is there a way to have the exe made from a swf close automatically when it has stopped playing?

I can put a button into other swfs to close the exe but I now need to make the exe close itself once the 30 second movie is finished playing. Is there some FFish script that would do it? Does it get added to the scripts area when creating the exe? I can't modify the swf as it comes from a screen capturing program.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 02-17-2007, 01:20 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:noobie question- autoclose exe?

You can check whether the movie stops at every 10 seconds. If it stops, you can call the close method to close it

Code:
function checkClose()
{
if (!FlashPlayer.isPlaying())
{
getMainWnd().close();
}
}

Application.setInterval(checkClose, 10000);
Reply With Quote
  #3 (permalink)  
Old 02-17-2007, 01:44 AM
Junior Member
 
Join Date: Feb 2007
Posts: 2
Default Re:noobie question- autoclose exe?


Thankyou SO much!!!!!

Fantasic service!
Reply With Quote
  #4 (permalink)  
Old 04-03-2007, 08:58 AM
Junior Member
 
Join Date: Apr 2007
Posts: 2
Default Re:noobie question- autoclose exe?

It doesn't work for me.

I have a .swf movie that starts when one presses a button. But when I insert the code into the button handler (or any other place) it doesn't work. The code doesn't contain errors but it's more like the .swf is ignoring that piece of code. When the animation is over it resets it's self to frame 1 like always and from there it's waiting for the user to press the button again to start the animation again.

How is this possible? What did I do wrong? ???

Thanks in advance.
__________________
[img]http://img296.imageshack.us/img296/86/xsig2007bg7.png[/img]
Reply With Quote
  #5 (permalink)  
Old 04-03-2007, 11:19 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:noobie question- autoclose exe?

You cannot insert the above ffish script code into your button event handler, which is actionscript. If you are using flash 8 and you want to close the main window when press the button, please try the following code:

Code:
on (click)
{
    import SWFKit.*;
    var wnd = Global.getMainWnd();
    wnd.close();
}
And of course it will work only after you have converted it to an exe file by using swfkit.
Reply With Quote
  #6 (permalink)  
Old 04-03-2007, 12:23 PM
Junior Member
 
Join Date: Apr 2007
Posts: 2
Default Re:noobie question- autoclose exe?

Ah... Of course.

Thanks for the reply. It works now.
__________________
[img]http://img296.imageshack.us/img296/86/xsig2007bg7.png[/img]
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:06 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.