Argumentos de línea de comando de Flash Player para "Crear proyector"

I am looking to automate the task of creating a .exe from .swf file using "Create Projector" option in flash player. I am trying to achieve it using an ant build file. Can someone point me to the right direction. Tried searching but didn't found what are the command line arguments which are available with flash player and how I can convert a .swf to .exe.

Note: Need to use on Flash Player as a runtime, no 3rd party players/solutions.

preguntado el 28 de agosto de 12 a las 14:08

I don't think there is a command line option to create a projector. It must be done via Flash Professional. I would recommend looking into creating an Adobe AIR application that makes use of the Captive Runtime feature to create an exe. You should be able to do taht via the command line or an ANT build. - You don't need Flash Professional to create a projector file. Its a menu option in Flash Player, which allows you to create a native application. I am searching for a command line argument to flash player, which can take a .swf file as a command line argument and output a .exe file(in case of windows) or a .app file(in case of OSX). -

I didn't know Adobe still distributed the stand alone player. Nevertheless; I don't believe this can be done at the command line. I'll re-iterate my suggestion to use Adobe AIR w/ Captive Runtime. - I don't want to add the load of Adobe AIR library and runtime on my application, as my app doesn't depend on any of those api's. It just makes use of flash player playerglobal.swc and a framework which runs on top of it(something similar to flex). Thanks for your suggestion but that doesn't serves my purpose. -

The amount of weight that Captive Runtime adds to a Mobile App is borderline trivial; but I think the desktop addition is less so, though. However, if it doesn't suit your needs; it doesn't. -

2 Respuestas

I don't know of any way to do this but in case it helps, I wanted to point out that FlashDevelop is able to hook into Adobe Flash Pro to do the publish, but you have to have the FLA open in Flash Pro.

Respondido el 29 de diciembre de 15 a las 20:12

Note: The Askee did like the answer:

SWF's as SWF's for EXE's.? I would say that is native to Adobe Flash, plus there has always been ANT 'Build Commands' -- as well as -- ITASCA in use for these processes (now deprecated). The main positive outcome for your situation is that I already had code that I used for something similar, so I added it to github - Take a look, it is very straightforward with comments and instructions: Note, the Application Manifest files along with custom **bat** files allow the /exe files to be generated from your action-script within ** and application.xmL **

function setPPS(F1, ActionVersion)

        if (fl.fileExists(F1)
                var _x, _f, _t, _d;

                var file_n = F1.split("/").pop();
                var path_f = F1.split(file_n)[0].join("/");
                    file_n = file_n.split(".")[0];
                var pt = path_f + "/_Profile_._x";
                _x =;
                _f = _x.indexOf("<defaultNames>");
                _t = _x.indexOf("</defaultNames>");
                _d = _x.substring(_f, _t);
                _x = _x.split(_d).join("<defaultNames>0");
                _f = _x.indexOf("<flashDefaultName>");
                _t = _x.indexOf("</flashDefaultName>");
                _d = _x.substring(_f, _t);
                _x = _x.split(_d).join("<flashDefaultName>0");
                _f = _x.indexOf("<flashfile_n>");
                _t = _x.indexOf("</flashfile_n>");
                _d = _x.substring(_f, _t);

                var p3i = "../";
                if (file_n.indexOf("/") > -1){
                  var splitPath = file_n.split("/");
                  var i = splitPath.length;
                  while (i--) {  p3i += "../"; }
                _x = _x.split(_d).join("<flashfile_n>" + p3i + "deploy/" + file_n + ".swf");
                var types = {};
                    types.projectorWinfile_n = "exe";
                    for (var n in types) {
                        _f = _x.indexOf("<" + n + ">");
                        _t = _x.indexOf("</" + n + ">");
                        _d = _x.substring(_f, _t);
                        _x = _x.split(_d).join("<" + n + ">" + file_n + "." + types[n]);

                    _f = _x.indexOf("<ActionScriptVersion>");
                    _t = _x.indexOf("</ActionScriptVersion>");
                    _d = _x.substring(_f, _t);
                    _x = _x.split(_d).join("<ActionScriptVersion>" + ActionVersion);
                    _f = _x.indexOf("<PackageExportFrame>");
                    _t = _x.indexOf("</PackageExportFrame>");
                    _d = _x.substring(_f, _t);
                    _x = _x.split(_d).join("<PackageExportFrame>1");

                    if (ActionVersion == 2) {
                        _f = _x.indexOf("<PackagePaths>");
                        _t = _x.indexOf("</PackagePaths>");
                    } else {
                        _f = _x.indexOf("<AS3PackagePaths>");
                        _t = _x.indexOf("</AS3PackagePaths>");
                    _d = _x.substring(_f, _t);
                    var cpt = "./";
                    if (file_n.indexOf("/") > -1){
                        cpt = "";
                        var t4 = file_n.split("/");
                        var i = t4.length;
                        while (i--){
                            cpt += "../";
                        case 2:                        
                            _x = _x.split(_d).join("<PackagePaths>" + cpt + "classes");
                        case 3:
                            _x = _x.split(_d).join("<AS3PackagePaths>" + cpt + "classes");  
                    function writeAllDOM(xstrg,pt){
                        FLfile.write(pt, xstrg);
                        fl.saveDocument(fl.getDocumentDOM(), cpt);


Respondido 25 Jul 13, 04:07

-1; because I don't understand what you are recommending in the slightest. I don't understand your opening question. I'm not sure you would say is native to Adobe Flash. I'm not sure the acronym ITASCA means nor what you say is deprecated. I'm not sure what your github code is supposed to accomplish; but all I See in that link is a read me file and a license file. You may consider re-working this answer to make it more descriptive. - jeffryhouser

As the one who downvoated you; I want to specify I am not the original askee. Unfortunately, I do not understand your modified answer any better than your original so am not willing to remove my downvote. - jeffryhouser

Could you please update your github link, I don't see any files there. Also, could you please mention the steps on how to run it? - Chetan Sachdev

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.