2

I was wondering so long that how can people analyze the trait of each file extension (of course open it in notepad is not readable)

For example, I want to write a program that can read everything from .fla file like timeline, movie clips, position of each MCs or all the motion tween values. And get the image embeded in it. (I'm planning to use flash as IDE for another project.)

(The reason that I tried to read proprietary format is I want to utilize their awesome editor. What I actually want to do is, I want to make an iOS game with cocos2d. There is a code to move things around in cocos2d but there is no decent editor. So I'd like to use Flash as an editor, then convert the motion to objective-C cocos2D code by reading the .fla file.)

5argon
  • 3,683
  • 3
  • 31
  • 57
  • If you want to analyze the structure of an FLA or any binary file, this question might provide some help: http://stackoverflow.com/questions/1026066/how-to-analyze-binary-file – F21 Apr 07 '12 at 03:58
  • Are you talking about reading the file with ActionScript or in some other development environment? I mean, it seems like a fool's errand either way, but at least the latter is within the realm of possibility. – jhocking Apr 07 '12 at 04:00
  • I want to read file with Objective-C code so I can edit the animation in Flash's editor then use it in my game. – 5argon Apr 07 '12 at 10:14
  • Instead of having to do this, how about just exporting the animation as a video file or a animated gif and use that? – F21 Apr 07 '12 at 11:24

2 Answers2

2

If you would like to be able to import timeline animation from flash into cocos2d, this tool might help. More information in this thread.

The grapefrukt-exporter might also help as it can export keyframe data, and various other formats for animation.

Instead of creating the tool yourself, it might be much easier (and time saving) to use one of these and integrate it into your workflow :)

Finally, if none of the above works, how about just exporting the flash animation as an animated GIF or a movie file?

F21
  • 32,163
  • 26
  • 99
  • 170
-1

Im assuming you want to write a decompiler, this is possible and there are several available on the internet, price varies.

It is not possible for flash to achieve this, Most programs, software are built on a native language such as C, Native meaning it can independly run in its own with out initially setting up an invironment to support it. Flash is not independent enough to be available to have this much power.

Try looking at c++ or C# as this would be possible, also these languages are a lot more powerful.

joshua
  • 676
  • 1
  • 5
  • 19