Reputation: 38180
#include is deprecated in AS3 but import is not really equivalent. In C# there is using which is like import AND PARTIAL CLASS.
AS3 needs something equivalent to #include to be able to organize code like partial class so what's the equivalence ?
Upvotes: 0
Views: 416
Reputation: 10235
You can still use include, it is not deprecated (as far as I know). It just no longer has the hash sign in front of it. So try:
include "myasfile.as"
Make sure that you include either an absolute or relative path to your .as file.
Upvotes: 2
Reputation: 4698
There's no such thing as partical class in AS3, but you can include by using import
For example I have a class and above the class definition I have a package definition.
Example:
package WeatherStation.NormalStation
{
public class NormalStation
{
Then in another class I have:
package Employees.Operator
{
import WeatherStation.NormalStation;
public class Operator
{
NormalStation station = new NormalStation
The class Operator imports the NormalStation class. Now I can access NormalStation within the Operator class.
But to answer your question... (after reading it again) I'm not aware of any way to do what you want. There are no partial classes and no way to have #import like in C/C++. Sorry! :-(
Upvotes: 1