View Full Version : Exit .exe aplication?
mounekles
08-04-2006, 10:56 AM
Hi....
I am trying to make a sequence of images play as soon as the cd is inseted.
I converted the swf file to exe, as I also have a couple of 3d clips I want to show, played by a media player....now....how to I get to exit all that?
I would like to add a "close" button , but have no clue what the code should look like.... went through the "fscommand" pages in flash help but no luck..
....any ideas?
Fresh_ales
08-04-2006, 11:00 AM
you want to exit ??where from??
from your Projector file or??
mounekles
08-04-2006, 11:08 AM
from the actual exe aplication that is running....
outlando
08-04-2006, 11:11 AM
fscommand 'quit' should do the trick? I think it's 'quit', anyway. Might be 'exit' or 'close' though...
mounekles
08-04-2006, 11:17 AM
Well it seems that fscommand(close); is the right command but how do I make it work when attached to a frame?
What I want to do is ..once the close btn is pressed, play my 3d logo and then close the aplication....
outlando
08-04-2006, 11:26 AM
I'd apply it to a function tbh...
//create a variable telling application whether or not it's ready to close:
readyToClose = "not yet"
//create a function to check status of that variable:
this.onEnterFrame = function(){
if(readyToClose == "now"){
fscommand(close);
}else{
null;
}
}
}
//create a function telling application to perform the animation:
function animation{
//play your animation, when animation finishes set variable:
readyToClose = "now";
}
//tell the close button to play the animation:
closeButton.onPress = function(){
animation();
}
Hopefully that should do it... I can't test it right now though, so if it doesn't work I'm sorry!! ;)
mounekles
08-04-2006, 11:27 AM
.
mounekles
08-04-2006, 11:29 AM
I'll give it a quick try...
Fresh_ales
08-04-2006, 11:36 AM
you cannot CLOSE some aplication with flash...
or at least i really dont have enough knolyge/emagination to have a clue how to do that!?!!
if it is doable...PLEASE shere this info with us:rolleyes:
mounekles
08-04-2006, 11:37 AM
no......
maybe this will help.........I am using Northcode to convert the swf file to exe
through the northcode options, I selected "esc" as a closing btn for the aplication.... isn't there a command that does the same thing with pressing the esc btn?
mounekles
08-04-2006, 11:39 AM
Well I am using and old file from someone else, who does that....but lost the actual lines where the "exit" command is....the old swf-converted to exe file I got, would just close by clicking the close btn......
outlando
08-04-2006, 11:49 AM
You can definitely create a button in a projector file which will close the projector file when pressed. I know this because I have done it myself. It's an fscommand, but I don't remember exactly what.
Of course, unless you're playing with third-party tools like Jugglor or Zinc, there will be the normal application frame around your Flash file, this has a close button on it!
mounekles
08-04-2006, 11:59 AM
At the moment I just have a msg on screen that tell you to press "esc" on your keyboard to return to windows.......but I 'd rather do it properly..... the guy I got the file from did it with actionscript 1 but the file it such a mess....
I couldn't locate where the hell the command is and he is very hard to find!
Damn.......
mounekles
08-04-2006, 12:01 PM
Well through the options of norhtcode I made the screen to be with no frams or borders, just the content....I thought it looks more profesional.... so the addition of an exit btn was essencial....
outlando
08-04-2006, 12:03 PM
Found it
on (release){
fscommand("quit");
}
Give that a whirl :D
mounekles
08-04-2006, 12:11 PM
I tried it earlier...though attached to a frame like this:
this.onEnterFrame = function() {
fscommand(quit);
}
and nothing happened.....
mounekles
08-04-2006, 12:15 PM
Now I am trying this....since I want the aplication to exit without pressing anything more after the last animation plays, I have a btn tha takes the whole stage and this code:
on (rollover){
fscommand("quit");
}
I noticed that I was missing the quotes... so let's hope this one works...
mounekles
08-04-2006, 12:17 PM
no iti didn't.......lol.....damn....
mounekles
08-04-2006, 12:51 PM
I am just gonna go for a cold beer......hands up!
stevenmccullagh
08-04-2006, 01:29 PM
fscommand("quit", true);
attach this to a button to exit the Flash .exe projector.
You cannot use it to exit an external app like Windows Media Player!
Perhaps, use a .bat file for that task.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.