actionscript-3 - "Include"AS3 中的外部 .as 文件

标签 actionscript-3

我想包含外部代码而不在 AS3 中导入自定义类。我的代码变得太长,我需要找到一种方法将它分割成位于不同 ActionScript 文件中的逻辑函数组。这可能吗?

最佳答案

ActionScript 提供 the include directive将一个文件的源包含在另一个文件中:

include "[path]filename.as"

Includes the contents of the specified file, as if the commands in the file are part of the calling script.



(您可能还会看到它用作 #include ,但自 ActionScript 2 起不再需要 #。)

关于actionscript-3 - "Include"AS3 中的外部 .as 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4874578/

相关文章:

actionscript-3 - 我的 RED5 服务器中的代码 NetConnection.Connect.SSLHandshakeFailed

apache-flex - Actionscript 3 自省(introspection)——函数名称

java - Object类变量如何创建?

actionscript-3 - AS3 : Mouse Speed affecting volume

php - POST vars 从 flash 到 php file_put_contents 文件名

actionscript-3 - ActionScript 播放音频

flash - 是否可以在 AS3 中不使用 XML 的情况下加载文件夹中的所有文件?

html - (AS3) 在自动换行后获取文本字段中的 HTML 特定字符索引

ios - 使用 StageWebView 加载 Youtube 视频时裁剪

apache-flex - Facebook iFrame 应用程序 : How to pass data from URL Query String