我想包含外部代码而不在 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/