claus / as3swf

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

SWFActionFactory Patch Request #5

Closed RickyAbell closed 13 years ago

RickyAbell commented 13 years ago

Hi there

I had the problem that if I had a Vector of IAction, I wanted to be able to know what type of Action my instance was. I felt the cleanest way would be to look at the code property but there was no area these values were maintained besides the SWFActionFactory switch statement. I looked at how it's handled in SWFTagFactory and then made changes along the same lines. So every subclass of Action now contains a static property CODE with its byte value.

Thanks InsomniacZA

claus commented 13 years ago

Sweet, thanks!