Is there any modern way to do games with ActionScript? - actionscript-3

I know it is possible to develop games with ActionScript. My question is:
Is there any way to generate a game like "Unity" does, with Adobe tools, without ask the user to install 3rd party plugins (Flash Player, Adobe Air)?
I would like to do a game with ActionScript, for mobile platforms, without the inconvenience of installing third party plugins. Is it possible?
How are made games like Clash Royale?
Appreciate.

You can export your Adobe AIR projects as standalone executable files, for example:
For Android you can export your app with the Captive Runtime, it will generate an APK ready to install. This APK won't require Adobe AIR installed on the user's device.
For iOS, AIR always exports the IPA with Captive Runtime, you don't have to worry about this platform.
For Windows, you can export an .exe file (only when you are using the AIR SDK for Windows).
For OSX, you can export an .app file or a .dmg file (only when you are using the AIR SDK for OSX).
If you want to export for all 4 platforms I recommend to code and design on a Mac, so you can export the .app/.dmg, .apk and .ipa binaries, and use a VM or a cheap Windows computer for compiling your .exe file.

Related

Creating a cross platform runtime AIR app

I am compiling an AIR application from Animate CC (mac version) with runtime embedded. No issues on the mac, but when i transfer the app file to a PC (running windows obviously), the app icon displays as a folder instead, and there is nothing within this folder that I can click on to run the app.
I was under the impression that Adobe AIR is cross platform compatible, so am I doing something wrong when compiling, or do I have to compile on a PC to create a runtime embedded app that will run on Windows?
It's impossible to launch Mac app on Windows. Because embed runtimes are different for Win/Mac. Here you can get some more info https://superuser.com/questions/56739/executable-files-in-mac-os-x-vs-windows.
So you either build 'Mac projector' and run it on Mac or 'Windows projector' to run on Windows (you can change this option in File -> Publish Settings). Tick both options and you'll be able to run it on Win and Mac.
One more option is to build AIR app - but it will require AIR runtime installed.
You're correct that Adobe AIR is cross platform compatible, but publishing from a Mac doesn't give you a Windows-runnable app, nor does publishing from Windows give you a Mac-runnable app.
You'll need to compile on a PC to get a Windows-runnable .exe

Publish AIR app including NativeProcess to .exe through Flash Pro

I'm trying to publish an AIR app to an .exe file from Flash Pro. My app includes the use of NativeProcess which means that my manifest file cannot include Desktop as a supported device and must include ExtendedDesktop. In the AIR settings I'm publishing as Windows installer.
I've tried publishing with Extended Desktop and Desktop selected, vice versa and both combinations but it seems to give me an error with NativeProcess which I don't get during testing, only when running the .exe file.
Any ideas?
I've managed to fix this issue myself. It seems that I needed to add ffmpeg.exe to the included files to be packaged with the app itself.

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...

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

Run AIR app without AIR runtime files

I've made an AIR app with Flash Builder 4. Works great but I want to run the app without installing it. So..... when I install the app, I copy the files from program files and paste it on a CD and give it to somebody. He runs it on another computer without AIR runtime with as result that it doesn't work.
How can I bypass this? Like some launcher/setup that installs AIR runtime for the client if it aint installed. If it is installed, run the AIR app.
Thanks.
Creating an AIR Badge would be a good option.
The idea is you pass a link to the client, the AIR Badge check if
AIR is installed. If it is, installs your app, otherwise installs AIR
first.
There's a pretty good AIR Badger tutorial on the Adobe Developer Connection site. AIR Badger is an AIR App Grant Skinner wrote to make the setup easier.
Also check out the new AIR Launchpad, which is another AIR app that helps you get started with all sort of AIR related functions, including install badge.
Unfortunately the AIR Badger works online.
You cannot bypass AIR install. Maybe have a third party utility(batch script/etc.) that looks for air related files/.air filetype associations and based on that launches an AIR installer you supply on CD or the app itself.
On osx you have the mdls command that displays information about a file. You could check for kMDItemKind:
mdls -name kMDItemKind /path/to/yourApp.air
If it prints "com.adobe.air.InstallerPackage", then air should be installed, otherwise it will just print "Document".
There should be something similar for windows command prompt that checks registry file type associations.
After you've done that check, install AIR first or just the app, depending on the result.
HTH