Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Maxim Mossienko
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Maxim Mossienko
    4 years ago (03 Mar 2007 13:18)
  • Updated by   root
    2 years ago (17 Jan 2010 20:43)
  • Jira: IDEADEV-15072
    (history, comments)
 
IDEA-37416 Flash std classes/func stubs are needed
0
Issue is visible to: All Users
  The issue is visible to the selected user group only


Issue was resolved
Comments (9)
 
History
 
Linked Issues (?)
 
Taras Tielkes
  Taras Tielkes
03 Mar 2007 19:49
4 years ago
The Flex SDK contains compiled libraries (/frameworks/libs/*.swc files) for all framework classes.
The SWCs (zip archives) each contain a "library.swf" generated by the mxmlc compiler.
The library.swf likely contains a single tag containing "abc" bytecode, including a constant pool (which is what you're after).

I haven't found a parser implemented in Java, but there is one written in OCaml, part of the "haxe" language/compiler:
http://haxe.org/tutos/flash9?s=flash#as3_hx_header_generation
http://haxe.org/tutos/flex_and_haxe_intro#creating_and_calling_as3_classes_from_haxe

http://cvs.motion-twin.com/horde/chora/co.php?rt=haxe&r=1.43&f=genswf9.ml
http://cvs.motion-twin.com/horde/chora/browse.php?rt=ocaml&f=%2Fswflib%2F
Taras Tielkes
  Taras Tielkes
03 Mar 2007 20:09
4 years ago
Tamarin project also contains relevant extraction tools: http://www.5etdemi.com/blog/archives/2007/01/as3-decompiler/
Maxim Mossienko
  Maxim Mossienko
04 Mar 2007 14:16
4 years ago
I know that the classes could be decompiled from swc/swfs but the license seems to preclude one from doing this :)
Taras Tielkes
  Taras Tielkes
04 Mar 2007 17:22
4 years ago
Maxim, which specific license are you referring to? The Flex SDK license, or a different one?
Taras Tielkes
  Taras Tielkes
05 Mar 2007 22:11
4 years ago
Maxim, can you provide a link to the license you were referring to?

A tool that just scans constant pools to extract class/method signatures would be allowed for interoperability reasons, I would assume.
Maxim Mossienko
  Maxim Mossienko
05 Mar 2007 22:29
4 years ago
http://www.adobe.com/licensing/developer/fileformat/license/

a. You may not use the Specification in any way to create or develop a runtime, client, player, executable or other program that reads or renders .swf files.

b. You may not use the Specification in any way to create a server, executable, or other program that will stream or deliver data from a client to a server, from a server to another server, or from a server to a client.

c. You will not make or distribute copies of the Specification, or electronically transfer the Specification outside your company.
Taras Tielkes
  Taras Tielkes
06 Mar 2007 22:48
4 years ago
Maxim,

That license only applies if you want to obtain the official file format specification for SWF9 from Macromedia.

But there is no need to do that, there is enough information available in public to build a constant pool reader.
Especially with the opensource donation of Tamarin project, which actually includes a full disassembler.
Taras Tielkes
  Taras Tielkes
25 Nov 2007 18:14
4 years ago
Maxim, what kind of solution did you implement?
Maxim Mossienko
  Maxim Mossienko
26 Nov 2007 00:27
4 years ago
Java swf / abc decoder (based on abcdump.as from Tamarin sources) that dumps as files reflecting class / members information