claus / as3swf

Low level Actionscript 3 library to parse, create, modify and publish SWF files.
MIT License
525 stars 127 forks source link

Adding embedded .abc (AVM+) bytecode tag #16

Closed stickupkid closed 12 years ago

stickupkid commented 12 years ago

Hi,

This is a class which allows you to embed .abc files into a swf.

Cheers si

claus commented 12 years ago

Afaik this tag was only used in early FP 8.5 betas, and Adobe internally calls it DoABC (and the "real" abc tag "DoABC2"). Have you seen it in the wild nowadays? I'm just thinking about how to properly name it (i don't want to change the name of the existing DoABC tag). Maybe DoABCDeprecated or DoABCOld would be better than DoEmbeddedABC?

stickupkid commented 12 years ago

Hi, I didn't know about the history of the tag. I agree the naming isn't amazing and I do agree that we should keep DoABC as is.

The reason for the need was because I was experimenting with the Tamarin ESC compiler and was hitting a brick wall using DoABC. I then realized it was supposed to use tag id 72 and without all the extra arguments (name & lazy)...

I don't think it's officially deprecated, I think 82 has just super seeded it Adobe:swfutils, but having said that I think the DoABCDeprecated might be appropriate as people shouldn't be using this unless they're doing something that they possibly shouldn't be doing!

Let me know and I'll change the name of the class and open up a new pull request.

stickupkid commented 12 years ago

FYI : here is the very simple experiment

claus commented 12 years ago

Interesting.. and that really doesn't work with DoABC (82)?

stickupkid commented 12 years ago

Unfortunately not, although if you use URLLoader it seems that it should do (I just couldn't get it to work!) http://stackoverflow.com/questions/5845439/how-do-i-call-the-tamarin-esc-compiler-from-as3-code

claus commented 12 years ago

Your code works for me with TagDoABC (EmbeddedABCLoader.as line 50)

stickupkid commented 12 years ago

Amazing! It does now, I really don't understand this, because it didn't on Friday!

stickupkid commented 12 years ago

I'll close this pull request as it's not needed any more :-) Sorry for the noise!

claus commented 12 years ago

Heheh.. well anyways, could you change the name to TagDoABCDeprecated, and also add it to SWFTagFactory.as? Thanks!