myClass{
var myXML:XML = new XML();
myXML.onLoad = function(){
myFunction();
}
myXML.load("myXML.xml");
public myFunction ():void{
// function contents
}
}
-- but when tried to run this, I had no luck. You also can't use "this.myFunction()" either since "this" actually refers to the results that have been loaded. So, after a bit of Googling I found this Blog post from 2004:
http://www.bit-101.com/blog/?p=525
It turns out that the easiest way to fix it is to create a var inside the class that refers to "this" like so:
var myClass:Object = this;
Then you can simply run the example above and everything is hunky dory again ;-)
No comments:
Post a Comment