I’m trying to use the JPGEncoder class in flash AS3 but this error keeps popping up (when testing):
1046: Type was not found or was not a compile-time constant: BitString.
The problem line is in the JPGEncoder class, which I got from here:
private function writeBits(bs:BitString):void
Anyone know how I could solve this issue? Thanks xD
This error means it cannot find the BitString class.
Make sure you hve downloaded the BitString class file and any other required classes. To be sure you might want to consider downloading the whole as3CoreLib and unzipping it while preserving file structure into your code folder.
Make sure they are placed in the correct folder structure, such as
yourProjetRootFolder/com/ adobe/images/BitString.asor if in a folder out side of the root make sure the path is included in your ActionScript 3 settings.