I want to include external code without importing a custom class in AS3. My code is getting too long and I need to find a way to segment it into logical groups of functions located in separate ActionScript files. Is this possible?
ActionScript provides the include
directive to include the source of one file inside another:
include "[path]filename.as"
Includes the contents of the specified file, as if the commands in the file are part of the calling script.
(You may also see this used as #include
, but the #
hasn't been required since ActionScript 2.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With