FlashCommand Flash 2004 Command Line Compiler
Well, I am finally releasing the first public version of FlashCommand. FlashCommand is a command line compiler for Flash MX 2004 Pro.
I am sorry it took so long to release, but I have been super swamped. I also ran into a bug where the installer no longer worked (it errors when trying to automatically set the path environment variable). This bug delayed the release, and I ended up just removing the installer. Hopefully, I will have time soon to track the issue down, and release an updated version with the installer.
IMPORTANT : This is something that I did in my own time, and is not supported by Macromedia. Use at your own risk. If you run into any issues (and you will), please post them in the comments. This will make it easier for me to keep track of issues and suggestions.
Here is a screen shot of ActionScript code being compiled from EditPlus. Notice that it catches the output (it will also catch compile errors if they occur). Btw, if anyone can figure out how to get this to work with SciteFlash, post the info in the comments.
Note, this is Windows only and requires the .NET framework. Sorry about that. I will try to make a portable version in the future.
Here is the usage information (from the readme):
FlashCommand.exe -e | -c | -p [-q] [-v] [-x] [-q] (-s <sourcefile>) ([-l] [<logfile>]) ([-o] <exportpath>) ([-f] <flashpath>) ([-t] <timeout>) -version : Prints out information about the program. -help | Prints out usage information. -e : Specifies export action. -c : Specifies save and compact action. -p : Specifies publish action. -l : Specifies whether output should be logged to a file. Optional. Takes an optional param specifying the path to the log file. If not specifies, log files will be place in\log -q : Specifies quite mode. Optional. If specified, no output will be written to console (although it may still be logged). -v : Specifies verbose mode. -d : Specifies temp directory that will be used for temporary file. -s : Specifies source files. Required. -o : Specifies the output file if -e flag is also set. Optional. If not specifies, file will be output to same directory as source. -x : Specifies whether Flash should be closed after it is done processing. Optional. -k : Specifies whether the temp jsfl file should be deleted. Optional. -f : Specifies Flash executable path. Optional. -t : Specifies timeout value. Optional -d : Specifies temp directory. Optional.
Thanks for Robin Debreuil, Owen van Dijk who provided valuable input and help.
Comments
-
great program :) btw, here's how you can add this to SciteFlash (v 1.53): go to Options/Open flash.properties and finde the line that says "Commands" .. (around line 162) .. enter your commands there (which will appear under Tools).. for example, here i added the flashCommand -help and publish command: #flashCommand command.name.4.$(file.patterns.flash)=flashCommand help command.4.$(file.patterns.flash)=FlashCommand.exe -help command.name.5.$(file.patterns.flash)=flashCommand publish command.5.$(file.patterns.flash)=FlashCommand.exe -p -v -s $(FileNameExt) hope it helps :)
-
Mike ChambersSweet. Works perfectly. Even catches the output and compile errors. mike chambers mesh@macromedia.com
-
Mike Chambersfyi, on SciteFlash, any way to have it automatically save the file(s) before it runs the command? mike chambers mesh@macromedia.com
-
for automatically saving - i don't know... but if you set the line in SciteGlobal.properties to: # Confirmation for saving files before building/compiling are.you.sure.for.build=1 it will prompt you to save the file before it runs the command (Options/Preferences/Global Options)
-
Awesome stuff, loving it! ;) Now if only we could compile without launching the graphic part of the IDE...
-
is this really windows only or is it possible to make it working with rotor ?
-
beekwill this ever be available for linux?
-
mike chambers>is this really windows only or is it possible to make it working with rotor ? Yes. It is windows only, because it accesses the registry. If there is enough interest then I will try and make it work on OSX when i get some time. mike chambers mesh@macromedia.com
-
deogeeIs flash MX 2004 being installed a requirement?
-
how can i run FlashCommand from Ant?
-
mike chambers>Is flash MX 2004 being installed a requirement? Yes. mike chambers mesh@macromedia.com
-
mike chambers>how can i run FlashCommand from Ant? yes mike chambers mesh@macromedia.com
-
Mike EvansThis is really neat... and chance you'd be willing to release the source?
-
mike chambers>This is really neat... and chance you'd be willing to release the source? Yes. Once I get the time to clean it up. mike chambers mesh@macromedia.com
-
ryan quigleyWould LOVE an OS X version...
-
i would also really like to see this on panther.
-
erici'll write an Ant task for this when you post the source code. Where should we look for it?
-
PhilHi! I'm very new to flash, and have only just tried editplus. I like both though, so could you please tell me how to set up editplus like you have in the screenshot, so that I can compile from within editplus? thanks, Phil
-
MikeI downloaded your compiler, extracted it, set the path. But when i run the compiler, i get a program failed to initialize error. Help?
-
Great news I am really interested in the Ant task. This is going to be a great tool for those of us building real applications in Flash. This confirms that Macromedia is really serious about being a production application platform. The new Actionscript 2.0 with a production compiler is a compelling reason to upgrade from MX.
-
HenrikHey folks. Probably a silly question, but I cannot get the flashcommander to work. When I run the command: flashcommand -s clientInfo.fla the trace says the following: An Error occured : Object reference not set to an instance of an object. at com.macromedia.mesh.Flash.FlashInfo.CreateFlashVersionTable() at com.macromedia.mesh.Flash.FlashInfo..ctor() at com.macromedia.mesh.Flash.FlashCommandRunner.DetermineFlashExecutablePath(Arguments arguments) at com.macromedia.mesh.Flash.FlashCommandRunner.Run() at com.macromedia.mesh.Flash.FlashCommandRunner.Main(String[] args) Please help me! I realize that there is something here I do not understand, so the error is probably easy to fix. I really need this tool to work in my project! Thanks, Henrik
-
mike chambershmm... What OS? Did you install the .NET framework? mike chambers mesh@macromedia.com
-
HenrikI installed thed .net1.1 framework on win xp Henrik
-
HenrikI also tried to install the .net SDK, but the same problem occurred. We want to evaluate this tool for our buildsystem. We are building tests for all kids in the norwegian elementary school (4th, 7th, 10th and 11th grade). There are approx 1500 testlets (flashfiles) that need to be compiled, and a commandline option is the only option for us. So I would really appreciate some help in making this promising tool work. Best regards Henrik
-
SandorYeah, an OS X version would be great
-
henrikI made it work on win 2k. On the xp version I still cannot make it run.
-
KyleWill there be a Java version? Then we have a cross-plaform solution.
-
Sounds great. I am trying to get it to work on XP but no luck so far...
-
Xeal>fyi, on SciteFlash, any way to have it automatically save the file(s) before it runs the command? # SciTE saves the file whenever the SciTE application loses focus save.on.deactivate=1
-
Hello !
-
"When the machine compiles your code, however, it does a little bit of translation. At run time, the computer sees nothing but 1s and 0s, which is all the computer ever sees: a continuous string of binary numbers that it can interpret in various ways." ???
-
Quentin!! hello !! I'm french student and i downloaded your command-line flash compiler but the application doesn't work because i can't decompress it ?? could you help me ?? thanks !!
-
CraigIs it possible to choose a profile to publish the FLA with?
-
Hi All, I like to make charts. like candle chart and line chart graph etc. i have downloded one component from the macromedia site. iam not able to customise that component. pls help me whare i can find the charting components and in customise Thank u all Murali
-
I was looking for ages for such a CMDline compiler!!! I use EditPlus a lot for actionscripting, so this one fits to my needs totally. Great work man! I hope you can expand it (e.g. update it often, maybe add new features). Are there ANY restrictions on this, maybe language (some byte-codes not to be translated etc) specific issues?
-
still waitin for the win edition of this nice tool. :(
-
mike chambersfyi, the downloads have been fixed now. mike chambers mesh@macromedia.com
-
stefgr8 ! is there a eclipse plugin available too ???
-
Jeremy SteinAny hints on how to do this for MX v6?
-
Great tool. I'd like to make it work running under a windows service without interactive privs (automated build server); possible?
-
arturMamo ja spróbuje porozmawiac z facetka. jak mi sie nie ude to nie pojade do szkoly a wezme od dentystki zwolnienie artur
-
I run FlashCommand from a scripting program called Visual Build Pro. The script publishes 101 FLA files in a loop, with a 2 second delay in between. Periodically, the build fails to create SWFs, but no error code is returned, so the script does not know there is a failure. When this condition occurs, we find that Flash.exe is running, but not interctively. As if it were hung in the background. Two questions: -- How can I capture a return code to detect failures? -- What might be the cause of these intermittent failures?
-
what is the jsfl code for import and export audio ? input == wav; output == swf
-
Samson ChanDoes this work for Flash MX (not 2004)? If not, is it possible to get this working for Flash MX?
-
mike chambersNo. It utilizes the new javascript extensibility layer in 2004, and thus will not work on MX. mike chambers mesh@macromedia.com
-
Deniss LarkaI get launched Flash with opened export settings dialog every time i invoke flashcommand. Is it ok ?
-
nourianano comment
-
Richard T-JHey Mike, Cool app, very useful (but...) I'm doing work with sequencial swf files for a mapping utility, and I often have over 30 swf files. Is it possible to add a cmd line parameter to also close the source file (but leave flash open), maybe an additional option to save & close. Also cool, but not vital would be the option to support wildcards in the source name: e.g. my files are often map_r1_c1.fla map_r1_c2.fla map_r2_c1.fla ... etc so a param of -s map_r?_c?.fla would be great. Cheers, and thanks, Richard
-
Mike, I am not a C programmer. Everything I do is web-based technologies. (PHP, SQL, HTML, FLASH etc). Why would I want a compiler for Flash actionscript. Would this product allow me to hide my actionscript code from prying eyes? This would be of interest in a component I've taken two years to create and now must expose my code to sell my product. Your thoughts? Jay Lepore FlashBOMB.com
-
Mike, I'm interested in combining several .swf files on the fly (dynamically selected) into a container .fla and then writing the end .swf file for production. Is there anything out there than can do this at a command line level? For example, calling it from a C# application. cheers, Bill
-
WOW, thanks, that command line Compiler is really great. See Ya Gima
-
DiegoGreat job :) But for integration with se|py actionscript editor?
-
WawbI've got a class directory: myBaseClasses And I've got a bunch of directories with .fla's where I set the publish settings to include ..\myBaseClasses in the classpath. When FlashCommand publishes (-p) my .fla files, I get no errors, but I also do not seem to be getting the base class definitions. Ergo, none of the .swf files behave at all as they are supposed to.
-
ionut-stoicaYou see mike, everyone is somehow asking for a real standalone fla2swf compiler or similar, but this will be a "too killer application" for products like flex. For the name of eternity, such a compiler would be able to creat up2date swf files(of current FlashPlayer VM). I see some people placed their fun&struggles on the net. I know about a software called FLASM, its nice, its real, its up2date, but it is EXCLUDED for a time saving application. ASM <- yaiks Then there is that ming php extension.That looks promissing, beeing able to do understandable operations that generate swf files on the serverside. But the major issue of such a compiler is that it might go on macromedia's own software. For example : 1) Alternative to Flex - a PHP based sollution(Not using MM Flex's component architecture - maybe something different) of doing RAD on the server side with all the benefits of Flex. 2) Alternative to Flash IDE - on my dear linux box here. A gtk composition canvas like DIA or the one that they use with sodipodi svg editor. Conclusion: My linux machine cries for Macromedia's products.It in fact SCREAMS.But not how people are tring to use it , like using wine or such(wich always gives me a feeling of unstable and illegal wherever i see it here in Romania), a native port. Its a lot of struggle getting a computer full set up for design and multimedia here. I pay Windows, I pay firewall+antivirus, I pay Macromedia ( Flash and Fireworks make me complete ) , i just bought Photoshop + Visual C# + a dozen more small software for autoruncd makeing&managemet+pluggins. Its really a hell of a lot of money. And this prevents most of real software industry guys here from investing. Expeling the operating system from the list gives a lot of hope. And gives them a straight line of legallity and respect. I know so many people and companys here using unlicensed flash + dreamweaver + fireworks copys that if you see their work you would say the earn a lot of money and they actually do, with 3-4 medium flash sites they could buy a license of flash at least, but they dont. And imposing this by force wont help, it is a society that learns and learns to respect software cause this is what provides them food.
-
Love it. I have Ant using it to compile my movies, but when I use the command line -x to shut down flash after publish, it will sometimes miss files in my file list ( going to fast? ). Also, it leaves the files open. Is there a way to say " close file after publish"?
-
I need some scripts in Flash Mx 2004 about running any application or programs in their path (where the resource it is). Because i want to make a CD with an autorun file. Thanks.....
-
I need some scripts in Flash Mx 2004 about running any application or programs in their path (where the resource it is). Because i want to make a CD with an autorun file. Thanks.....
-
julesI may be missing something, but is it not possible to specify the "test movie" action? This tool is obviously handy for final build of a project, but I was hoping to use it from SE|PY to test my movies as well. This tool would totally rock if it didn't start the Flash IDE at all! But I'm thinking that's a far greater task than just controlling the IDE programmatically. BUT, having said that, all these tools (FlashCommand, SE|PY, Scite|Flash, etc) indicate a failing of the Flash tool itself. This may not be an appropriate forum, but: 1) When do we get a decent code editor?! 2) When do we get a production-level compiler that doesn't interrupt my flow for two minutes while I compile my SWFs?! I'd write one myself if it was MY job ;-) Thanks for the useful tool. I'll be using it to build our FLAs for deployment, but that's about all at present.
-
FRANK>This may not be an appropriate forum, but: >1) When do we get a decent code editor?! >2) When do we get a production-level compiler >that doesn't interrupt my flow for two minutes >while I compile my SWFs?! >I'd write one myself if it was MY job ;-) Don't expect anything any time soon. I have a feeling MM are pushing FLEX at the expence of those of us that want to use plain flash to do the same thing. This will see a general shift towards the flash IDE being more aimed towards designers. All new cool components and technologies that could have been used in flash will be bundled with FLEX. You cant blame MM for trying to make more money and create vendor lock-in really. Have no fear though open souce has already provided an alternative. mtasc + eclipse + asdt
-
My favorite editor is Professional Notepad. http://www.atechgroup.net Smart editor with easy interface
-
Steve BuckleyCan anyone tell me the more detailed syntax for the -e parameter. Could I export version 6 and version 7 files in some kind of batch process?
-
HRKcan you help me to developpe a QCM questions in my flash documents i use a quiz template of flash mx 2004 professional but i found a problems to navigate when i integrate it in my document
-
Billtom
-
poonamHi, This compiler is good.But is there any way to publish an fla with an fscommand option.
-
SarahIs it possible to remove the functionality where specifying a path to the flash file is optional. In Editors like SEPY, you can Flush your actionscript and it will export and run the fla file that has focus in Flash at that time. As long as you have the right Flash file open, you're in business. The benefit of this is that I don't have to change my scripts that run FlashCommand, with a path to the files I'm working with each time. Ultimately, what I'm trying to do is come up with a good way to test my flash files when editing ActionScript using jEdit. Has anyone else had experience with this? Thanks!
-
poonamIs the Ant target written for the flashcommand?If yes how to use iy? Where can i find the details regarding the same?
-
TodYes Professional Notepad is very good! I do all my php stuff in it [url=http://www.atechgroup.net]Professional Notepad Official Site[/url]
-
I have a little question about timeout. What units (seconds, milliseconds) should be used? Can you put an example here?
-
ini gue
-
Newbie question: Can you specify multiple source files at once? How do you delimit them?
-
scottgreat tool. just thought Id point out another very handy tool for joining and creating .swfs called swftools. this has saved my bacon loads of time by allowing me to add extra code to a bunch movies by combining them with an actions movie.
-
AnhQuanThankx, Great work !
-
JenHey... I don't know if you'd have the answer to this, but I'm trying everyone I come across. I had Flash Mx Pro 2004 7.0 on my computer (windows 2000) but ran into a problem with my c drive not too long ago and had to re-partion drive and re-install everything. Now, flash won't install. Everything else will. But when I try to install flash I get this dll function error: Error number: 0x80040703 dll function Macromedia_Licensing_Installer.CdaSysInstallEx2 Ever heard of this? I can find no solution online or at Macromedia. Any suggestions?
-
WillIs there currently a OSX version of the FLASH COMMAND for Macromates text editor??? If so can someone please point me in the direction to download. I have tried so many of these editors Sepy is buggy, Primal is Windoze only, BBEdit sucks......... Thanks
-
Steve BuckleyMike, This is sort of an off-topic request, but is there a way to launch Director to compile an app via an ant build file. What I am thinking of is if you have a hybrid Flash and Director program you modified some of your flash elements (classes) and then ant build all the flash dependancies and then launches Director to do the final update and compile of the application
-
Anybody got this working for Flash 8 on OS X? Thanks, Sam
-
Hi, Great tool. Quite usefull. Would it be possible to give publish commands (like publish version flash 6) ? Thanks, Morgan
-
Charlie SkinnerIs it possible to use this with a Project file? Or is there anyway to know if/when the publish has completed?
-
LeiI tried this on PC with Flash 8, it open the flash 8, but always popup a window saying "Failed open document.", is there any flash 8 version for this great tool? Or am I setting it wrong? Thanks!
-
PaulHi, I use it with Ant and Flash 8, Write me if you want this build code. With my first 15 files it have been working fine. but with other files it miss some files. parameters used: Flashcommand -p -v -x -s my_file.fla its part of the log file: task.compile: [exec] Enabling Verbose mode. [exec] Using Source File : bonusGameSpin.fla [exec] Using Temp Directory : C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ [exec] Output File : bonusGameSpin.swf [exec] Starting Flash Process. [exec] ...... [exec] Total Process Time : 0m:5s:93ms [exec] Cleaning up temp files. [exec] Exiting. flash.bgWheelbonusGame.compile: task.compile: [exec] Enabling Verbose mode. [exec] Using Source File : bonusGameWheel.fla [exec] Using Temp Directory : C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ [exec] Output File : bonusGameWheel.swf [exec] Starting Flash Process. [exec] ... [exec] Total Process Time : 0m:2s:46ms [exec] Cleaning up temp files. [exec] Exiting. it looks like both files where compiled, but bonusGameWheel.fla was not, and it didnot show any error message. Some idea?
-
This is sort of an off-topic request, but is there a way to launch Director to compile an app via an ant build file. What I am thinking of is if you have a hybrid Flash and Director program you modified some of your flash elements (classes) and then ant build all the flash dependancies and then launches Director to do the final update and compile of the application
-
Hey, is there any updated version and how does this relate to flashdevelop.org?
-
I'm extremely interested in a command line compiler for flash/director combo's as well.
-
Hello, first of all, great idea to compile flash via cmdline. But i guess, somevery important thing is missing here; the zipfile itself. Also is there an updated version to use with Flash 8, e.g. Flash 9alpha? I really would enjoy to ucompile from te EditPlus editor. Thank you very much!
-
Omar sharifathat was Realy great Pro. ! I wanna Ask Maybe different thing ! Can we By using Flash macro. Action scripts , Do operating actions , like make Format for the PC as example ! Thx for time !
-
okay here goes, I am using Flash MX on a PC. I have a command file and 2 .jsfl files that were created for Flash MC on MAC and I want to use them on my computer now. I can't find the proper folders to install these into. I put them into my keyboard shortcuts folder in macromedia flash MX, and they aren't showing up in my list when I go into MX, I did install both of the .jsfl files into my commands folder for Flash 8 and it works fine, they showed up in my flash 5 commands drop down inside the program and the shortcut is working fine - when I go here: C:\Documents and Settings\susan.chaisson\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Commands there is no folder for Flash MX so it's not showing up - Do you know where I can or should be installing these files to work in Flash MX? Thank you Susie
-
reginhow to publish a .fla file to a .swf file for eg the .fla file is sm.fla is this syntax correct FlashCommand -p -s sm.fla -o smoutput.swf
-
Fazeel GareebooThanks for posting this ! Is there anyway to say publish a swf from the command line without firing up Flash author and have it bring up all its menus, etc... ? Maybe run it up in a 'silent/resident' mode and we can then fire off a number of command line publishes ? Thx
-
M.AHMADHello, first of all, great idea to compile flash via cmdline. But i guess, somevery important thing is missing here; the zipfile itself. Also is there an updated version to use with Flash 8, e.g. Flash 9alpha? I really would enjoy to ucompile from te EditPlus editor. Thank you very much!