How to install ANE Air Native Extension at runtime? - actionscript-3

Is any way to install and use ane extension from external module/swf.
As far i know, that extension files(ddl etc) is installed with native installer.
Is any way to install them in runtime, for example when external swf is loaded?

On mobile: no - all code needs to be there at compile-time; you can't load any external code at runtime (through a SWF or ANE).
On desktop, it might be possible, as an ANE is essentially a SWC with some magic, but in that case, it would be easier to just use the SWC/SWF directly.

Related

Test Flash generated .IPA, using Testflight

It's posible to install a Flash generated .IPA using TestFlight ?
I need to test my app in a few number of ipads, for private (not public) use.
Thanks.
I haven't used it myself, but there's a native extension for TestFlight provided by Adobe.
It comes bundled with the Adobe Gaming SDK (maybe you can download it separately).
Here's the documentation.

Build actionscript 3 project to exe

As simple as the title,
I want my project to run from an executable file rather than an swf
I know about the 'create projector' option but the latest flash player has this option grayed out.
I use flash develop if it matters
Thanks in advance
As Flextras mentioned in the comments you can distribute your AIR app as an exe+dmg by packaging it as a captive runtime.
This will bundle the AIR runtime alongside your app and will not require the user to have anything else installed. Everything needed will be contained in the application binary.
You can use adt to build your exe,
http://www.tricedesigns.com/2011/08/10/air-3-0-captive-runtime/
adt -package SIGNING_OPTIONS? -target bundle SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-OPTIONS | <input-package> )
More info,
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f709e16db131e43659b9-8000.html
You can also build it right from Flash Builder 4.6+
http://houseofbilz.com/archives/2011/10/11/captive-runtime-packaging-in-air-3-0/
If you do have dependencies you can also package your AIR app as a native desktop installer,
http://help.adobe.com/en_US/air/build/WS789ea67d3e73a8b22388411123785d839c-8000.html
http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html#articlecontentAdobe_numberedheader
If you run your .swf file using Flash Player 10.1, you can find Create Projector option still available. It looks like Adobe wants all the desktop applications to use AIR SDK and thus this option to Create Projector is greyed out. I am still stuck with fp 10.1 because of this.
Projector Export (Flash CC)
Projectors are Flash files that contain both the published SWF and Flash Player. Projectors can play like an ordinary application, without the need for a web browser, the Flash Player plugin, or Adobe AIR.
About this Extension:
Projectors were deprecated from Flash Pro CC, however, using this Extension you can now publish your Flash content from Flash Pro CC as a standalone application.
The exported Projector from Flash CC will be an .EXE file on windows and an .APP file on Mac, that can be played on any Windows and Mac machines respectively even without an installed Flash Player or plug-in.
How to Install:
Download the ZXP extension file and install it via the Extension Manager CC. (You must have Flash Pro CC installed on your system before using this extension)
How to Use:
Open the Fla file in Flash Pro CC that you wish to export as a projector.
Navigate to Commands Menu -> Export as Projector
Choose the location for saving your projector and click on ‘Select Folder’.
Download here:
https://nipunasthana.wordpress.com/projectorforflashcc
open swf file with flash player
file -> create projector
so easy...

Package Adobe Air to Exe

Using Flash Builder 4.6, I exported an Adobe Air file from my mobile project.
I'm trying to get it packaged into an EXE (that would include the Adobe Air Runtime)
The project was compiled with Air 3.1. I looked online and there are some ADT commands that people recommend using but the problem is that the command throws errors in Air 3.1
If i use air 3.0 ADT:
AIR file at [app path]/app.air could not be converted.
The error was ""
If I use air 3.1 or air 3.2 sdk
SDK is missing file [my path to air]\lib\nai\bin\naip.exe
I'm running
java -jar [path to air]\lib\adt.jar" -package -target native app.dmg app.air
I've also tried
java -jar [path to air]\lib\adt.jar" -package -target native app.exe app.air
I've also looked into projects like this one: http://bishoponvsto.wordpress.com/2010/02/23/adobe-air-2beta-2-to-exe-packaging-air-app-in-windows-executable/ , but it is for Air 2.0.
Any ideas? Apparently there is an integrated Flash Builder 4.6 tool, but for some reason the option under export release doesn't exist for mobile projects - strange...
Why do you want to do this? Air files -- when exported for a specific platform -- are executables.
If you are looking for an "installer" that will create directories, run the Air installation, and move auxiliary files to specific locations (docs, icons, etc.), then try Inno Setup.
EDIT:
The code you provided works for me to create a Windows EXE. But it seems a bit unecessary . . . why not just export the EXE file from Flash Builder ("Export Release Build" button in the top toolbar)? If you can't or won't, then here are some suggestions:
I am using Java version 1.6.0_29. Make sure your Java is not only up to date, but that you are actually calling the correct version (java -version).
Check the JAR directory text carefully .
Check that you are actually calling to the right Air version.
Make sure that the quotation marks are on both sides of the JAR path.
You should be able to do a "Export Release Build" (though I am using FB 4.5). Instead of selecting "Export as: Signed packages for each target platform", select "Export as: Signed AIR packages for installation on the desktop". (You may have to create a certificate, but you can create one through this export feature, too.)
(If you happen to be able to use the Flash IDE, the exported Air file has to support both "Desktop" and "Extended Desktop".)
Hopefully, this will allow you to both produce an Air program that can be converted to EXE, and actually convert it using the command line.
I know this question is a little old, but a co-worker just ran into the same error message using the command line tools and FlashDevelop. It turns out that he was accidentally packaging some source files into the .air package, an extra copy of the app descriptor and one of the swc's was getting packaged in the .air file. I removed those and repackaged the .air file, then used this command:
adt.bat -package -target bundle kiosk kiosk.air
This successfully created a captive runtime exe. Of course there's no need to create a .air file first, you can package right to native or captive runtime, but since my co-worker was creating .air files I did it that way too just to be sure it would work.

AIR file too big, breaks during installation

A client is having me convert an HTML5 video web application that I've already built into an AIR app.
The end users are going to need this to work with no internet access, so I MUST include a LOT of video files with the installer. This works fine on my machine, but my client can't install it because the .air file is too large and they don't have enough RAM. We'll need this installed on a number of laptops that aren't super powerful.
My SDK is up to date and we're using AIR 3.1.
Has anyone else run into a similar situation? Is there any workaround? For instance could I either include both the installer and the .air in a zipped folder, then have the installer move the video files to the appropriate location, or use AS to have the installer download the files (they will have internet access when installing).
I'd recommend you not to include heavy video files into your application. Downloading assets from web is a descent idea, I use same technique for several museum touchscreen apps.
So here's workflow: on startup app tries to connect to "assets server" and request list of files to download. It can be list of all the files, or list of files that have been updated/added since timestamp that you pass with your request. Then you download them to File.applicationStorageDirectory. Not to have mess in that directory I put all of them to "cache" subdirectory.
In case there's no internet connection for some reason when you install that app, you can have all that "cache" folder on your memory-stick/externalHD so you can manually perform that downloading process.
If you use Greensock's LoaderMax: I've written a simple URLStreamLoader that extends LoaderItem, handy for downloading files. Can share that.
The problem is quite obvious: the Adobe AIR provided installer for deploying your application is lacking.
However, Adobe recently released a new feature for deploying Adobe AIR apps: "runtime captive bundle" (Windows or OSX).
Which means 2 important things:
You receive an .exe which no longer requires an user to have Adobe AIR runtime installed (and no more incompatibilities when targeting multiple Adobe AIR runtimes).
You are no longer provided with an installer, and you have to find your own (which solves your problem halfway).
Target bundle when "compiling", and then just use a better installer (Windows or OSX) - think you are just deploying a normal application (worked for me:) ). There are too many installers arround to mention.
Your installer of choice + bundle compiling, together solve your offline installation requirement and the memory exhausting issue.
Packaging a captive runtime bundle for desktop computers

What is the best way to allow third-party changes to Runtime Shared Libraries?

How can I do the following in Flex 4.5 or later:
Compile an swc library file containing packages of simple functions
Compile an swf application referencing the swc file as RSL
Publish the swf application
Send the source code of the swc file to another developer
Allow the developer to modify the code of some functions while keeping their interfaces
Allow the developer to compile the source code into a new swc file using only compc
Allow the developer to replace my original swc file with his new swc file, then execute my swf application having the new swc file in the same directory.
I tried the above many times, just to fail. Is there any alternative?
The only way to eliminate additional compilation against the updated libraries is re-thinking your architecture: If all the dependencies in the RSL are properly decoupled, you should not have any problems.