In the older AS’s you could call an array…
bob = new Array();
And then inside some random function be like…
bob[0] = “soldier”;
bob[1] = “40”;
etc… or at least
_root.bob[0] = “soldier”;
How can you do that in the new AS3?
Also I can’t seem to include anything… I thought include just stuck whatever I had into the middle of the page…
like if i had bob.as and inside it had only one line with … trace(‘hi bob’);
And i included that inside some random function, it would trace hi bob from that function… that just breaks my compiler when I try that… Why?
Thridly… I finnaly found out that to call a function from another class which was imported, I had to first import… then do something like…
public var game_new:game; // to make it useable
then inside the initial function i did a
game_new = new game(); //to me that seems very redundant, but ok i see how it doesn’t have to be…
then type
game_new.functionname(); //just to run that function
Is there an easier way?
Can the function ‘functionname()’ which was in game_new. call a function from the original package? like… initial2() or something like that?