AIR - Making use of air.swf file in an internal network - apache-flex

Hello StackOverflow community,
The air.swf file referenced here:
http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html
used to launch AIR applications from Flex applications requires the use of an air.swf file located here:
http://airdownload.adobe.com/air/browserapi/air.swf
We have tried to download this SWF and use it in our internal network, but it is not working, we depend on using the one located in the Adobe site.
Is there anyway to use this air.swf file without having to access the Adobe site?
Thanks!
Mauricio

No, this swf will not work if it's not loaded from adobe.com domain.

You can download the air.swf from the Adobe website (which the docs say you are free to do) and load it locally. Then the first call correctly gives the status of the AIR installation - "installed" or "available". However, if AIR is installed, the next call to getApplicationVersion always fails with "null" no matter the AIR app is installed or not. If I run the Adobe hosted version of air.swf everything works fine.
I am trying with AIR 2.0 and Actionscript 3.0.
i know this is rather a partial answer, but if I figure out more I will edit it!

Related

Is it possible to start an Adobe Flex app on OS X with just the AIR runtime and the .swf

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.

Convert Multiple SWF files to Single EXE

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

Flex - Air "nativeprocess not supported"

I want to fix the error when am using "nativeProcess" class it giving error, How to resolve the error.Any air installation failed?
According to documentation, NativeProcess is only supported with extendedDesktop profile via Native Installer
In clear text, you must have this in your appName-app.xml
<supportedProfiles>extendedDesktop</supportedProfiles>
And export your application as an .exe file (or whatever your system is), not an .air file.
I ran into such issue when i was using wrong adobe air sdk. As you know, native process support was introduced in 2.0 adobe air sdk. But i used Adobe Flash Builder plug-in for Eclipse, and Eclipse was pointing to 1.5. Manual replacement of air files in the sdk folder with ones in the Air 2 SDK and pointing Eclipse to the right sdk fixed the problem. See detailed description here:
http://www.selikoff.net/2010/06/28/installing-the-adobe-air-2-sdk-in-eclipse/
If you are using the appropriate air sdk, ensure that you've included "extendedDesktop" profile to the "supportedProfiles" section in your application descriptor file.
Are you running with needed privileges?
Did you do exactly as in this?
What kind of process you are trying to call?

How can I tell Flash Builder 4 where to look for FlashPlayer.exe

I uninstalled Flash Builder Beta 2 and installed the Flash Builder 4. I tried to import my new projects, but I keep getting a popup that says:
"
[path/to/Adobe Flash Builder Beta 2/FlashPlayer.exe]
Flash Builder cannot locate the required version of Adobe Flash Player.
Do you want to try to run your application with the current version?
Adobe Flash Player downloads"
I have a run config on a localhost server instead of generating the html wrapper. This only happens with imported projects, but I can't seem to find where in any of the config files the player location is specified.
I don't have a specific answer, but...
Instead of importing projects into a new workspace; have you tried using the same workspace? You can specify the workspace using the data argument when you launch Flash Builder:
flashbuilder.exe data="C:\something\something\something\workspace"
If that doesn't work, you can try to launch Flash builder with the '-clean' command line argument. I've found that fixes a lot of the issues I have.
Also check your SDK on the imported projects. Make sure it is not pointed at an old SDK from the beta 2 directory. After you change the SDK, be sure to clean the project.
Or if none of that works, re-create the project from scratch.

Open exe file from Flex3 Air

I have .exe file, which is done in VB. i need to open or hit that exe file from Flex3 air application on Button Click event.
i need to simple hit that exe file to run, no need to open inside the air applcation.
How to hit the exe file in Air app...?
Thanks in Advance
Air itself does not provide the ability to launch external applications (I see this as a significant problem with AIR).
Some people have created a hack that would allow you to do this and provided it as a library, though I'm not sure how reliable it is (it does some weird things with the way Windows loads DLLs that I'm not sure I completely trust).
Aperture framework: http://aperture.fluorinefx.com/
Blog discussing the implementation: http://blog.fluorinefx.com/?tag=native
As Herms said, AIR doesn't allow you to do that. However, Java does and you can connect your AIR app with Java using merapi.
For now, the best and easiest way to do this is, as Amarhosh said, to use Merapi. Or you can wait to AIR 2.0 (the end of 2009) which will bring native access support.
AIR 2.0 will support using NativeProcess.

Resources