"Include" external .as files in AS3

I want to include external code without importing a custom class in AS3. My code is too long, and I need to find a way to segment it into logical groups of functions located in separate ActionScript files. Is it possible?

+4
source share
1 answer

ActionScript provides an 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 were part of the calling script.

(You can also see that it is used as #include , but # not required with ActionScript 2.)

+18
source

Source: https://habr.com/ru/post/1338096/


All Articles