Ok Guys, I have an interesting question for you. I have 2 classes, one extending the other. However, when I trace the values, Im not getting what I expect. It’s kind of tricky, but I’m sure someone would be able to catch the problem straight away
My first class:
class File{
function File()
{}
public var name:Array = new Array(); //String;
public var address:Array = new Array(); //String;
}
My second class:
class Folder extends File{
function Folder()
{}
public var description:String;
}
On the main timeline:
var n:File = new File();
n.name[0] = “little”
n.address[0] = “poopoo”
var b:Folder= new Folder();
b.description = “Some kind of description for whatever”
b.name[0] = “big”
b.address[0] = “forty”
trace(n.name[0]) // it shows forty. How on earth does that happen??
So you see, after the trace, I’m getting the value for the other class. Why is that happening???