|
|||
|
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 |
|
|||
|
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);
|
|
|||
|
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] |
|
|||
|
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();
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|