Game fla file missing from Starling build - possible recovery or decompile? - actionscript-3

I've been working with a programmer on an app and we've since gone our separate ways. I was passed on a copy of what was supposed to be the source code of everything at the end. However, I believe I'm missing a crucial file from the app build.
It's a pretty cool, but fairly basic 2D game. Built with Starling (gamua.com/starling) in ActionScript 3.
My question is, with all the files and assets mentioned below, is it possible to recover, reverse engineer, perhaps decompile, what I need to complete the app. Or will this project's code need to be re-written from scratch?
In my game 'build' I have following folders:
assets, bin-debug, extensions, libs, src, and system.
I am a bit of a noob in coding (as you've probably gathered), but it looks like I'm missing the .fla file from the 'src' folder. The contents of that src folder is:
com, utils (folders), Constants.as, Game.as, Main-app.xml, Main.as, Menu.as, Root.as
I was hoping that there is enough information in the .as files intact, that the restoring of the .fla to compile the build is not a big ask?
If other questions stand out to you, please ask.
Thanks!

Normally, Starling game is not built in the same way as a regular Flash game in the old days. You files look to me a lot like FlashDevelop project (there also should be .as3proj file somewhere in the root folder of the sources), which does not use FLA and compile the game from .as classes directly.
P.S. Or, maybe, Flash/Flex Builder project. Regardless, the possibility there were no FLAs to begin with is high.

Related

Getting to know Flash IDEs

I am trying to learn AS3 by downloading Flash Projects(open source), but can't seem to really grasp the right way to get the projects to run (through compiling) with IDEs (I am using FlashDevelop as an IDE). Here's an example:
http://www.flashkit.com/movies/Games/Shooting-manish_c-12372/index.php
Here's what I try to do:
I open a new Project on FlashDevelop
I copy all the folders to src, and make the main file(In this project it's called "rhymingRockets.as") as the Document Class.
I delete main.as (generated by default), and try to run it, but get the errors: Error: Definition fl.transitions.easing could not be found.
Click here to see the problem
Sorry for bothering you with such a simple question, but any help will be greatly appreciated, as I am new to Flash.
Error: Definition fl.transitions.easing
That error indicates that you are not linking to the fl.transitions.easing library/package correctly. There is a related question here (as3 fl.transitions.Tween could not be found). If someone is sharing the source of a project, they may not have shared the source code or compiled .swc for any libraries the project may use since that is not project specific.
You might find this link of use: Linking .swc files in your ActionScript Editor. Since you say you are new to Actionscript, I'd suggest that you don't waste too much time on getting 3rd party projects to run – I realize it's tempting but not much learning from that and lots of frustration. Better to work with your own small learning projects to try out different ideas or libraries.

How to update SWF without re-compiling the FLA

All my SWF files run the same script class, There are a lot of .swf files to be updated after making some changes in that script class, Normally to see changes in SWF files I would open the FLA files and compile. Since there are thousands of SWF it will take too much effort.
is there any way to update all existing .swf files without a need to re-compile .fla files
Thanks for your consideration.
I guess by "refresh" what you actually mean is recompile.
To automate that, you have a two options:
1- JSFL, which is a pain in the ass.
2- Write a program that will compile every .fla throught command line, which somehow can be even more painful
I'm not an expert in both of the solutions so let me just give you a guide on how to do it the first way: http://gskinner.com/blog/archives/2004/08/jsfl_fla_batch.html
By definition, it's impossible to create or modify a (million of) swf (pdf, doc, gif, php...) file without opening it.

Compiling structure of .as back in swf

I am having a problem related to flash/as3 files.,
I decompiled an .swf file (shop in a open source game) wich, its in chinese. i want to translate some chinese pushstrings in "text" to english text.
I can decompile it simply, as wells after decompiling, editing it.
My main problem is (after spending 3 days in the Internet searching a method 2 do it), i can't just publish a new version of the .swf , with the .as translates back. It just gives an 1kb swf with no .as on it.
Btw: the .swf files consists of no animations, since its a sub part of a main one.
The structure of .swf after decompiling looks like this:
tinypic.com(safe) - .swf structure
I'm using Flash builder + Flash CS6 to edit. -- in case link broken -- http://tinypic.com/view.php?pic=2ldzy4o&s=8#.U6UVI_ldWSo
Any help would be apreciated. Thank you community ;)
De-compiling a Flash (SWF) file in order to recompile it will very, very rarely work.
It could be as simple as you having one error, but you'll find that all variable names are using standard names and without knowing the structure of the application, it wouldn't be easy to work out where the problems are.
You should begin by making sure that CS6 has the correct document class set up. Once you've got that, you'll start seeing the errors. With that amount of classes, though, I would expect there to be a lot of errors.
I've searched the Internet for about 5 days or something to make a method work, like u said barely worked. My main interest was to convert .as3 with Traditional Chinese Lang, to English. I found a program with a little slow method: JPEXS Free Flash Decompiler.
I can open a .swf file and edit it without decompiling, and edit the text(hard work with /Google translator) but, hey, it works (don't know how but somehow he compiles the traits of the text in the .as3). And I had to be cautious editing it, one little error or a " missing bugged the whole file.
Thanks anyway for your response :)

Can I make a swc file with alchemy that will work for AS3 programmers that do not use alchemy?

I am very new to Alchemy and not an expert in using swc to store code(Although I am well aware that it worked for me so far). I want to make sure I understand if Alchemy is the right tool for me in this situation.
I want to make a simple script in Alchemy to help make certain 'heavy lifting' in the code lighter and less time consuming and ooze out more performance. The trick is that my colleagues will likely be daunted by the installation process(even though there is a guide). So my question is, if I do take the time to work with Alchemey, can I make my code available to other people that do not use it, for our project?
Hope that makes sense, my instincts (gut feeling) says yes. I simply want to make sure.
Yes, this is exactly what SWCs are for, you can compile your C++ code with FlasCC and expose a simple AS3 API that other people can use by linking your SWC into their project. Download the FlasCC beta and check out the tutorials it comes with that explain this in more detail: http://gaming.adobe.com/technologies/flascc/
Shortly, the answer is yes.
The point is you can't recompile the SWC into an SWF if you don't use alchemy. What you can do, is download at runtime (using Loader.load with ApplicationDomain.currentDomain) the SWF contained into the SWF (SWC is a simple zip, extract it).
Then, you can freely use the class that's inside, using ApplicationDomain.getDefinition("OneOfYourClass).
More about application domain
Since it's at runtime, you won't have to compile Alchemy, thus it should work fine for anyone.

Unify the size of swf

When I compile the same project with ant many times it gives a different sizes for each compilation
I added the rsl and more option to mxml it works fine ,but the size is still changed
Please any idea to unify the size
This is not really possible, unless you do some, quite involved post-processing. Below is the list of things I know to change the size between compiles, but it may not be exhaustive:
When you compile pure AS3 project or a project that uses framework:
Resources you embed on variables have their class names generated using the current date in the name.
Flex compiler generates a tag of obscure purpose (can be removed manually, but persists in release builds), which seem to contain a GUID and a compilation time or something similar. It is usually found at the very beginning of the SWF file, somewhere after the rectangle of the SWF dimensions.
In a project that uses framework:
All code generation is suspect to generating inconsistent names, particularly, all bindings will certainly produce different assembly upon each compile. Styles and some other rarely used metadata will cause this too.
Specifically for spark skins, which come as sources rather then compiled libraries - some of them embed resources in a bad way, so you would probably need to compile them into a library and plug it into a project, removing the sources from the source path.
All in all, if you are using pure AS3 project, your task is difficult, but doable (will require following certain conventions and some post-build script that unzips the SWF, purges the compiler-added extra tag and zips the SWF back. But if it is a SWF based on the framework - I'd say the effort isn't worth it, just accept it cannot be done.