Hey
What is the correct way to import ‘sub’ classes into a main class?
What i have is a class (i call it Console) that gives the user info about the swf for debugging, but also gives the user the ability to give their input to dynamically change the swf. Sorta like what games have when you press the “`” key.
But it handles more things then just read user input, it also connects to the Database through PHP and connects through the server using Sockets.
And there are more of those things that gets added later, so to prevent it gets to big later i want to split it into multiple .as files
Console Class: renders stuff and allows user input.
I want that to include the following classes:
ConnectPHP Class (handles php > mysql)
ConnectJava Class (handles sockets)
So that the methods in those 2 classes are accessible in the Console class like:
var con:Console = new Console();
con.connectJavaFunction();
I tried importing them but then i had to access them through the Object initialized:
con.socketJavaObject.connectJavaFunction();
But i want to access them as
con.connectJavaFunction();
removing the reference of the ConnectJava Object. Is this possible?
If you wonder why, id like to keep it as simple as possible because i share the classes with my friends.
edit: I know extending does the job but you can only extend one class.