Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Include" external .as files in AS3

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?

like image 975
Abdulla Avatar asked Dec 01 '22 03:12

Abdulla


1 Answers

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.)

like image 195
Juan Pablo Califano Avatar answered Dec 09 '22 10:12

Juan Pablo Califano