-
has anyone ever seen an swf parser written in visual basic? i know a little bit of c but i don't know some of the stuff they use in the open source parsers, making it harder to learn. I am interested in writing an IDE for action script which you can read/write to the swf file from the ide. thanks
-
Flash Turbine...but it is pretty expensive.
If you don't want to spend hundreds of dollars, there is no solution for reading SWF files (although bukoo can write SWF files from VB).
My advice: Learn C++. C++ is not difficult to learn (you could do it in a week without too much trouble), but it is hundreds of times more powerful when you know how to use it. Also, languages such as JAVA and C# are both pretty much based off of the C++ concepts, so learning them is even easier once you know C++. You'll need to learn an OO language eventually, you may as well do it now.
--Jesse
PS: Also, if you are going to market your IDE, C++ is almost a requirement. VB is extremely slow in comparison, doesn't give you as much control, and is pretty much impossible to port to other OS's.
-
If you're planning to write ActionScript into a SWF you will need to write an ActionScript compiler. ActionScript is not stored as text but as compiled bytecode.
Is anyone else out there planning to build an AS compiler ?
-
Oh .. and if anyone is thinking of building an action bytecode to ActionScript decompiler, I would be *very* interested.
-
Buraks already has a bytecode to actionscript decompiler out.
--Jesse
-
Originally posted by JAEzell
Buraks already has a bytecode to actionscript decompiler out.
--Jesse
Yes - but it costs money (which is not bad in itself) and it is not available as source or as a module that be called from other code.
-
True...there is also SWF Extractor by chironex...but that also costs money and the source is not available. In any case, if a company really needed actionscript support in their product, I'm sure that one of those two would be able to "share" their code/insight for a certain fee :-).
--Jesse
-
Hi,
enter the old chinese in the game...
Ming is opensource and has an actionscript compiler, and I think there is a decompiler (actually disassembler) as well
If you need yet another swf parser that can handle actioncode, I've just upped my own to http://www.fontimages.f2s.com/private/swf.zip
This is not freeware but rather beerware, so if anyone could manage to mail me a few bottles I would appreciate it
Musicman
-
I've almost finished SWF Version5 action script decompiling. It's just the object creation - and that annoying enurmerate tag , I don't want to have to keep track of all the objects and there variables! especially when I'm only decompling, not executing -. I'm also very interested in creating an action script IDE. It's been on my mind for a long time.
-
Musicman: from what I can tell Ming has a C-like script compiler that only covers Flash 4 action code capabilities.
Chironex: I'm also nearing completion on an AS decompiler for JavaSWF2 !!
The enumerate action doesn't seem that hard.. you don't have to keep track of all the objects properties.. just recognize the following action code pattern:
Code:
for( n in x )
{
trace( x[n] );
}
..compiles to..
Code:
lookupTable
0: "x"
1: "n"
push lookup( 0 )
enumerate
label1:
register 0
push null
typedEquals
ifJump "label0"
push lookup( 1 )
push register( 0 )
setVariable
push lookup( 0 )
getVariable
push lookup( 1 )
getVariable
getMember
trace
jump "label1"
label0:
end
-
Hi nmain,
Ming with F5 support was released about a week ago (let's say as a public beta with fewer bugs than other public betas). I was using ming's CVS version for quite some time on a major project, and I know just one case where ming is generating wrong code. To be honest, I also know a case where Macromedia's output is "questionable" - and the latter one is more likely to happen.
BTW: I would rate the output you show as "disassembly" rather than decompiling, but it is probably impossible to regenerate true actionscript from swf files
Musicman
-
the output the nmain has given is exactly what the byte code is like, nmain has even formated it all and made it nice so we can read it, the big part is going from that garbage into action script, which is possible. But to eactly match the originally action script... up to swf verion 4 this is possible with out to much trouble. but the addition of the flash 5 actions, especially when produced with flash, makes it difficult -
e.g there are only two program flow actions - if and jump.
but there are about 6-8 different action script flow control blocks - if,else,while,do-while,for etc.
It is possible to identify how flash makes up each of these, but when you use it on action script that flash didn't create you could run into problems.
-
Yes - the output was an action code dump from JavaSWF.
The decompiler will (hopefully) produce proper ActionScript.
The bytecode that Flash produces is reasonable to decompile - I totally agree that optimized bytecode produced by some other tool might be difficult to decompile.
Anyway - decompilation is not vital. Compilation is the important thing.
What would be really useful would be an ActionScript parser/compiler written in JavaScript/ActionScript...
-
Hi,
there has been a partial compiler - or lets say a clever eval function - as part of a debugger project. You will have to search the last 3 or 4 months here and at were-here.com, probably for keywords object-oriented and debugger
Musicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|