View Full Version : Save Images and Open another File
ceryni
03-31-2008, 02:51 PM
I have two Questions actually.
No.1: Scenario:An application a bit like paint that lets you draw pictures.
Its all complete but is it possible to save the current picture that you have drawn as a jpg or png? i dont want a button to save it. i want it to save when u press enter. or when you exit the application ( alt+F4 )
No.2: How do I load another flash .exe file from a .exe file?
Example: a validation program written in flash that says if the result of the validation is true then UnLoad this program and Load a new .exe
basically whats the line of code that opens another .exe program. both programs i wrote myself in flash.
Thanks for your time.
allenrabinovich
03-31-2008, 06:56 PM
Unfortunately, Flash is heaving sandboxed. Unless you are writing your applications for AIR, you won't have access to the file system, so you won't be able to save any files. Furthermore, AIR or not, Flash can never run external executables on the user's machine.
So, unfortunately, you are probably better off using a different development environment.
I have two Questions actually.
No.1: Scenario:An application a bit like paint that lets you draw pictures.
Its all complete but is it possible to save the current picture that you have drawn as a jpg or png? i dont want a button to save it. i want it to save when u press enter. or when you exit the application ( alt+F4 )
No.2: How do I load another flash .exe file from a .exe file?
Example: a validation program written in flash that says if the result of the validation is true then UnLoad this program and Load a new .exe
basically whats the line of code that opens another .exe program. both programs i wrote myself in flash.
Thanks for your time.
ceryni
03-31-2008, 07:54 PM
BUt what i dont understand is that you can publish files as png's and jpegs, so can you use as to just publish the current picture?
Also you can load another exe file in flash coz ive seen splash screens e.t.c done in flash leading to another flash file. thats what i mean.
its going to be in the same file and all it needs is a button or event that triggers the loading of the other .exe file. ive seen it done before so it has to be possible.
Does no 1 know how??
ceryni
04-07-2008, 09:25 AM
So theres no way to load external .exe files does this mean i should publish the programs as swf and load that? would it be a problem to do that? the application im making is going on the market and i would feel safer with it as an exe file but if it needs to load other flash files Its going to have to be swf isnt it?
arpace
04-07-2008, 10:11 AM
first off is this remote, or local? if it is a local projector, the exe will have to in a subfolder of where your exe is stored. You could also create a .bat file, and include some commands using basic batch file scripting.
Canazza
04-07-2008, 10:36 AM
Flash doesn't load external .exe's, flash compiled or not. It loads .swf files
If you have your main projector as a .exe, it will only be able to load the other flash applications in their .swf format.
arpace
04-07-2008, 08:00 PM
Okay, your right about the exe... I just tested it and it doesn't work anymore; yet, this does.
as long as the file is in a subfolder named fscommand this will execute the batch file:
function exec():void {
fscommand("exec", "instruction1.bat");
}
exec();
I am using the cs3 as3 and 9,0,115,0 under vista
works like a charm , and although I usually only use it for simple tasks, it can be used to run an exe/dll/bat/js/vb... etc.
http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy
would rather use screen weaver though
ceryni
04-09-2008, 11:38 PM
good plan! didn't know that, thanks. ill try it out. :)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.