I have 2 classes. A Main.as class and a class called Inventory.as.
In main I have the line
public var inventoryClass = new Inventory()
To Access the Inventory.as
I also have the a function that traces and array (inventoryToSaveArray) from the Inventory.as
Inside the Inventory.as the only lines that effect the ‘inventoryToSaveArray’ Array are
public var inventoryToSaveArray:Array = new Array();
To declare the variable.
In a on a EnterFrame Event (this is just as an example – the array is filled with more specific numbers but I have tried to simplify it to figure out the problem.)
So what I get outputed now is the inventoryToSaveArray getting longer and longer each frame.
However if I run the function from the Main.as to trace inventoryToSaveArray from the Inventory.as it traces a empty array.