I have a simple little test app written in Flex 3 (MXML and some AS3). I can compile it to a SWF just fine, but I'd like to make it into an EXE so I can give it to a couple of my coworkers who might find it useful.
With Flash 8, I could just target an EXE instead of a SWF and it would wrap the SWF in a projector, and everything worked fine. Is there an equivalent to that using the Flex 3 SDK that doesn't end up requiring AIR?
Note: I don't have Flex Builder, I'm just using the free Flex 3 SDK.
In your Flex SDK folders you should see a 'runtimes\player\win\FlashPlayer.exe' which is a stand alone Flash player. Open your SWF with that and you'll see a 'Create Projector...' menu item in the File menu which will create the stand-alone EXE.
imaginaryboy gets it right, I believe. Btw, since you don't have Flex Builder, you might look into the free and open source FlashDevelop if you're on Windows. It's my favorite environment for developing anything Actionscript (the Flex support is pretty great, too).
There's also Zinc that also provides API:s for accessing the filesystem and other thinks that AIR does, but less restrictive.
Related
I know it is possible to run an Adobe Flex compiled .swf from the command-line using the adl command-line tool.
Is there an equivalent way to run a Flex .swf from the command-line using the system installed AIR runtime?
My question applies to OS X, but I'd interested to know about other platforms also.
UPDATE: This question is now somewhat obsolete. As of AIR 3, there is now an 'officially supported' way to bundle the AIR runtime with an application, using the 'captive runtime' deployment option.
I just tested to run an AIR app without the need to install the application.
Copy the following folders from your Flex SDK
bin
runtimes\air
as well as all files from your "release" (bin-debug) folder of your project.(Don't build a release build!).
now you can run the application with "adl app.xml".
Though there was AIR runtime installed on the PC I think it should be possible without it too.
The original question was a bit different though, maybe it's helpful anyway.
I say No! A SWF is not the same as an AIR application. If you take that SWF's code and compile it into an AIR application; then you should be able to install and run it independent of the browser or any development tools.
I suppose in theory you could create an AIR application where you give it the location of a SWF and use SWFLoader to load the actual SWF. I don't think that is quite what you're after.
There is a stand alone Flash Player which is different from AIR and different from the browser plugin. You can get it here. You can use that to run the SWF as if it were a local app. I wouldn't count on your users having that, though.
You can also load a local SWF in the browser and let the flash player plugin handle it.
Hi I have an application in flash, I build in ActionScript 3.0 Flash IDE, my application loads some external swfs which mentioned via XML file. Its working fine at the moment. But I need to compile all these external SWFs and xml file into single exe file. How can I compile like this. or how can I code like this?
EDIT: 1
from here : http://page-flip.com/products/pdf-publisher/
You can see an example, the application is build in .net and it import pdf and publish it as flash projector or web based(swf). How is it compiling all the external SWF files.
If you have Flash CS4 you can make use of the mxmlc compiler which has some additional tricks up it's sleeve.
Using the embed tag like this will allow you to embed an entire swf "inside" your swf:
[Embed(source = '../assets/items/9.swf')] public static const ITEM_9:Class;
Then, to instantiate it you simply go:
var mySprite:Sprite = new ITEM_9() as Sprite;
Using this and some clever overloading of your current classes for external loading should allow you to get a single swf (xml files can be embedded in a similar fashion).
Then it's just a matter of using the Publish settings to make Flash spit out an .exe
On an unrelated note, please go back and accept some answers to your questions. It's not very nice not to.
You can try mdm Zinc.
Zinc is really powerful. It lets you package your Flash or Flex in different ways, with lots of native platform hooks.
you can build an AIR application. if you don`t want it to be cross platform, you can build an AIR application with a windows native installer.
Flash > File > Project settings > Windows Projector.
For MAC, choose a MAC projector.
If you are burning to a disc and you need both platforms to work...a good option is to use Toast (if you are on a MAC)...it will hide the files you don't need the user to see, and also hide windows files from MACs and vice versa.
There is an application for Windows called SWFKit, which allows you to package your SWF and external files into one exe file. I had the same problem as you, and this worked a treat for me. Unfortunately you do need to pay for it :( http://www.swfkit.com
Hope this helps,
Will
I would go about it with these steps
create a flex application
embed all of the SWF's and the XML into that application
create a release of the application you just created
open the SWF application with the stand-alone flash player and not with the browser
from the file menu select the option create projector
All of this will result a single EXE file that contains all of the SWF's and the XML file.
You can use a projector or make an windows only AIR project.
Use flajector and forget about your problems
That's about it. Oh, and I don't want to convert the Flex Builder Project making it incompatible with Flex Builder 3 Pro.
Yes! Here is an article and video that shows how to use the Flex 3 SDK in Flash Builder 4.
Yes, you can compile the project with Flash Builder 4. ISTR it either silently updated my project settings or I might have converted the project.
In any case, if you are trying to simultaneously use Flex Builder 3 and Flash Builder 4 you should note that at least one of the internal eclipse & FB project settings files (.actionScriptProperties, .flexProperties & .project) changed format between FB3 and FB4 - I can't remember exactly which ones changed off the top of my head.
This will affect your development workflow.
I have previously used Flash Builder 4 on a project whilst the rest of the team was using Flex Builder 3. Whenever they updated their project I had a lot of problems with conflicts in at least one of the above files. Whenever this happened, I just accepted the FB3 versions of the files, and let FB4 internally deal with upgrading the format. If I somehow needed to make changes to those files (such as adding a new class), I'd either get another team member to do it, use FB3 to add the files, or just manually edit the file myself. Irritating, but not the end of the world.
YMMV.
Yes. Adobe products are extremely backwards compatible. However, some Adobe products will by default save your "older" files into the newer format - ie if you saved your FB 3 project with the FB 4 application, you may have to choose "Save As" to force it to save it as version 3 (this is true at least for Flash, not certain if Flex is different in that regard). This is only relevant if you need to retain the older file format for compatibility with other coworkers who only have an older version of the program.
I am using the flex SDK to compile actionscript 3 classes into an swf. Some components are not included with the SDK like the fl.controls components.
What options do I have for getting access to the flash components? I've seen others mention that I can export them to a swc file within Flash Pro, but I would rather not have to purchase Flash Pro to just use some components. Is there any other manual way to perform this without purchasing or using Flash Pro?
Thanks
You don't need to use Flash Pro to do that.
here's what I do:
create an Fla and dump all the components on the timeline that you need.
you can then remove them from there (or leave them), it doesn't really matter, as long as you see them in the library. You can even move them directly into the library.
Then under publish options select flash only, and in the flash tab select the export to swc option.
now when you compile, even when using Ctrl-Enter the swc gets compiled.
The next step would be different for you, because I use flash develop (which is free) I copy the swc into my project's lib folder, and in the program I right-click on it and select add to library. done.
I don't know how you select the add to library in flex, but it is possible. Flash develop uses the flex compiler and it does it, and flash does it as-well. so czech the project setting for this option.
You can get Free Flash Components here:
http://www.flashcomponents.net/components/free_flash_files.html?1=1&f=cprice&fv=0,0
They are not from Adobe but independent developers.
Here are set of 32 Flash UI Components for $99: http://www.flashloaded.com/flashcomponents/bitcomponentset/
I am pretty sure you have to purchase an Adobe Flash product to get the Adobe components. I used the components I got with CS4 for SDK development.
We'd like to have an app autorun when our clients put in our info CD.
Is it possible to do this using Adobe AIR... We were thinking of using the Flash Projector cause it compiles to an .exe which is easily launched, but there's no way to get rid of the ugly window chrome is there?
AIR Apps have to be installed right?
Thanks
It isn't going to work with AIR, but there are numerous Flash projectors that would work. AIR needs the runtime and has to be installed.
I had the same requirements and ended up using zinc. You can't get an AIR app to launch without installing it (much assuming that the user has the runtime in the first place) but zinc allows you to do so AND deploy to multiple environments like AIR with custom chrome if need be...Good Luck!
You can't do it with AIR. In fact that was one of the key design points of AIR, that you couldn't do automatic execution.
You can theoretically do it with a .EXE projector file, but it requires some fancy footwork, and I don't think you can output Flex to Projector.