Hi mbenney,
When you declare something like
code:
fdoc = function(success)
{
trace(this)
};
You have declared an object constructor, eg:
code:
Person = function( name, age )
{
this._name = name;
this._age = age;
};
Person.prototype.getDetails = function()
{
return "name: " + this._name + ", age: " + this._age;
};
var tim = new Person("Tim", "30");
trace( tim.getDetails() );
// output is "name: Tim, age: 30"
As you see I defined an Object constructor and a function on that object.
What you might have really wanted to do is something like this:
code:
doc = new XML();
doc.ignoreWhite = true;
doc.onLoad = function() {
trace(this)
}
doc.load("links.xml");
It's a confusion that should no longer be a problem in AS 2.0 (coming soon in Flash MX 2004).
Hope this helps!