What is the best way to use SWF library runtime (AIR) - actionscript-3

I am building a project in AIR that going to run third party SWF. What is the best way to instruct people creating those SWF files?
I don't understand how signing is going to work here. to avoid that I been trying to create a library project in Flash builder 4.7, how ever I do not see an option to export it as SFW file, nor I know a way to share SWC in run time.
So how do I do this?

Related

How to use Haxe SWF for Compiled Adobe Air Desktop App

How can I convert a Haxe SWF to a compiled native app using AIR?
Is there a way to override the Flash default .SWF export when you use a Haxe Command Line to export a SWF that can be packaged up into an Adobe Air file?
I'm having trouble finding information on how to compile a Haxe .SWF export via command line into Adobe Air. Ive tried deleting the default swf and renaming the Haxe .swf export, but Adobe still rewrites it when it packages everything up.
E.G: "haxe -swf main-flash.swf -main Main -swf-version 15 -swf-header 960:640:60:f68712"
I'm using Mac OS X with Flash CC and Atom to write my game with Starling-HAXE. I want to target desktop (PC/MAC/Linux).
Thanks!
The OpenFL tools used to support Adobe AIR on the desktop, if you look at this older helper class, you may find hints on how you might go from a Haxe-generated SWF file to a final AIR application:
https://github.com/openfl/lime-tools/blob/master/helpers/AIRHelper.hx
Looking at it again, I believe you call ADT with the proper signing parameters. You probably need an application.xml file as well, here is one:
https://github.com/openfl/openfl/blob/master/templates/flash/templates/air/application.xml
You would need to replace variables such as "::APP_PACKAGE::" with com.yourcompany.yourproject, and other sensible values.
If someone would like to look at integrating AIR support into the Lime tools again, I'm open to the idea. The problem I was concerned about was long-term maintenance
I have some batch files that will do this (although will most likely need to be reworked on your behalf). I'm not at my computer right now, but will post them over the weekend. On a side note it would be great to have this type of functionality baked into flashdevelop.

FDT - Where is new Flash Project?

Up until this point I have been doing all of my coding in sublime text 2, and compiling with flash pro cs6. I have gotten pretty good with actionscript 3. I have been uing the mvc design pattern and used external libraries like admobs and electroserver. The real reason why I got fdt and wanted because I wanted to play a source file I downloaded in which the document class was mxml.
In every tutorial though I see them say, "oh just click new flash project". the problem is though that there is no choice "flash project" There is only actionscript project and fdt project or fla.
In flash ide I would use one .fla as a "shell" to publish from, and have another .fla with the assets that would be embedded in as3 from its swf. I'm sure that's not the way to set up files in fdt, but I dont know the right way to do it, or even the right way to start.
Maybe I am not finding the right page, but it seems that the documentation on the site is pretty weak. Are there good tutorials somewhere that will help me start compiling projects? thanks
A tutorial specifically for people transitioning from flash ide to fdt would be helpful too.
I could be wrong, but from this IDE, you can't compile fla.
Instead of this, it provides another approach to build projects.
You have to start "new FDT Project", select base and set main class,
which must be compiled.
In result this approach more flexible and convinient.

Best way to make a downloadable version of a Flash game?

I already made a game with flash, and I want to provide an easy download for people that would rather play offline. Thing is, i use a folder whole structure to dynamically load content per level. Folder structure looks like this, not that it matters that much:
Game folder
animations
anim1.swf
anim2.swf
sounds
music1.mp3
soundeffect1.mp3
levels
level1.lev
level2.lev
myGame.swf
How should I go to distribute this? Should I just resort to make a zip file for the flash game and assume people know how to extract and open the swf? Is there any other way to port easily as an executable? Perhaps Adobe Air (not sure if this works though)?
Thanks, and please help!
Distributing a zip file is the only option if you really want that structure to prevail. Else,
Embed all the resources in the main (myGame) swf & distribute it.
Provide a html page for people who do not have standalone flash player installed.
Embedding as a single file allows the browser to cache the single swf & allow the player to keep playing offline until cache is cleared. So user might not even need an explicit download.
If you are using Flash Builder it is fairly straightforward to compile the application into a self-installing AIR executable (or DMG on a Mac). It is possible to include the AIR runtime which would avoid potential problems of the user not having the correct flash player for example.
An alternative to AIR would be to create a projector executable from inside the standalone Flash Player or from the Flash authoring environment.
Another option to using a zip file would be to use a free installer creator such as InnoSetup or Nullsoft on Windows, or Packager on Mac. Linux users are generally more tech savvy and so a tar would probably be well understood.
Adobe AIR works wonderfully! I use it for my own project, and your project should transition over to it with little to no modification (any issues should show up in the Compiler Errors and Output). The only downside is that, past AIR 2, there isn't any Linux support.
The other option is obviously to create a standalone .SWF projector inside a zip or installer, but in my opinion, that isn't the sleekest way to deploy for desktop. The advantage of AIR over this is that it gives you access to additional desktop functions that Flash Player doesn't.

edit actionscript from swf - compiled file

I have one swf file, it is JW Player plugin. It have one actionscript file in which is whole plugin code, and rest of files are jwplayer api files. So i need to open that file (where whole plugin code is) and edit few lines. But there is a problem, because when i try to decompile file with sothink swf decompiler (and few others) - to convert it to .FLA, decompiles simply crashes. It is because of some file from jwplayer api library. So, next thing i tried is to edit via HEX (because there is not much to be edited), but i couldn't find what i needed. So what i need is - is there any way or not? If yes, which program can be used for this?
I've had to do something similar in the past. In my scenario, the client had the SWF but no FLA. I needed to change a hardcoded url and sothink wasn't decompiling but I could view the AS in the sothink previewer. Luckily for me the flash wasn't very complex so I was able to copy the AS and graphics out and start a new project. I would imagine that JW Player is much more complex so this may not be an option for you, but thought I'd mention it anyway.
Depending on your needs, you may be able to get what you want by using the plugin API to extend the functionality or maybe even by customizing a skin.

Can't import fl.motion

I have Flex Builder 3 and currently writing an Actionscript 3 program.
I attempted to import fl.motion package in my program and it could not be found when I ran it. This is the first time I am importing the fl.motion. Is that package available to FlexBuilder 3 users.
Yes, if you regularly own a FlashProfessional licence you can simply grab the the swc inside your Application folder. On Mac you might find it in /Common/Configuration/Actionscript 3.0/libs/flash.swc. Simply add the swc to your project references.
You must have Flash Professional in order to use fl.motion.* packages.
It is not part of Flex or the standard Flash library. It only comes with Flash Professional.
It is still possible to get these packages one way or another, but I think there may be some legal issues if you do not have Flash Pro in the first place.
Of course, if you have Flash Pro, you can use these libraries in Flash Builder.
If it is in order to move objects, there are some free or open source tween libraries available on the web, like Tween Max.