Can you theoretically use Actionscript 3.0 to make a Flash Application solely on code?
I'm trying to make a website that al开发者_Python百科lows you to A) Edit FLA files online and B) Export to SWF. It would be easier on a server if everything the user did on the web, it was translated into code. Is it possible to make an Adobe App in just code? And if this is true for AS2 (or should I not even bother)? And is that even legal? Why or why not for all these questions? Thanks for helping! I appreciate your helpfulness.
P.S. What programming language would be best for this kind of website? Client-wise and server-wise. Thanks again!
Yes you can. AFAIK, sites like wonderfl.net use the Flex Module for Apache/IIS (links towards the bottom of the page). This module allows servers to compile .as files into swf files.
A) Edit FLA files online
You would need to understand how the binary format(.fla) stores data and I don't think there are any specifications for the fla format available. You would have to reverse engineer the format. On top of that, you would need to create an interface to mimic the functionalities you need to modify an FLA.
It's probably more realistic to compile .as files into .swf files on the server, and those .as files would be generating by this tool/app you want to build. I can't think of legal issues when compiling .as files to .swf if it's your own code.
A port of SFWMill to Haxe is not yet a complete implementation of SWF format, but it is close enough. This would allow you to create an online standalone assets compiler, with no back-end requirement. It is in Haxe language, but Haxe is very similar to AS in many aspects.
FLA is a proprietary format, meaning that even if you knew it's structure, reversing it may cause legal problems. Besides, why would you want that for yourself? I'd imagine an old proprietary format having all sorts of patches, irregularities of kinds etc... just go with something that is easy for you to edit.
AS2 is not being worked on for a few years now. It's not officially discontinued, but no bugs are accepted for that language and runtimes any more. When you write in AS2, you are pretty much speaking Latin to Italians.
Regarding online compilation of ActionScript: There is an online compiler written by hurlant. It may not always act the same as Adobe compilers do. There are other tools for compiling to AVM bytecode, specifically, http://haxe.org/com/libs/format/abc and http://www.as3commons.org/as3-commons-bytecode/index.html.
精彩评论