简体   繁体   English

在AS3中使用JPGEncoder类时出错

[英]Error when using JPGEncoder class in AS3

I'm trying to use the JPGEncoder class in flash AS3 but this error keeps popping up (when testing): 我正在尝试在flash AS3中使用JPGEncoder类,但是这个错误不断弹出(测试时):

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 : 问题行在JPGEncoder类中,我从这里得到:

private function writeBits(bs:BitString):void

Anyone know how I could solve this issue? 有谁知道如何解决这个问题? Thanks xD 谢谢xD

This error means it cannot find the BitString class. 此错误意味着它找不到BitString类。

Make sure you hve downloaded the BitString class file and any other required classes. 确保您已经下载了BitString类文件和任何其他必需的类。 To be sure you might want to consider downloading the whole as3CoreLib and unzipping it while preserving file structure into your code folder. 确保您可能需要考虑下载整个as3CoreLib并将其解压缩,同时将文件结构保留到您的代码文件夹中。

Make sure they are placed in the correct folder structure, such as yourProjetRootFolder/com/ adobe/images/BitString.as or if in a folder out side of the root make sure the path is included in your ActionScript 3 settings. 确保将它们放置在正确的文件夹结构中,例如yourProjetRootFolder/com/ adobe/images/BitString.as或者如果在根目录下的文件夹中,请确保路径包含在ActionScript 3设置中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM