hi all
i am just writting this test code in AS1.0. Now the problem here for me is am not able to get access to my class variables.I m doing this stuff for learning As1.0. Although in 2.0 i get through those using static variable(trick i got from macromedia forums ). bt in As1.0 i dnt hw to do this.
here is my code:
function main()
{
this._xml=new XML();
this._arImages=[];
this._xml.ignoreWhite=true;
this._xml.onLoad=this.LoadData;
}
main.prototype.showImage=function()
{
trace("Great! that function calls me");
}
main.prototype.LoadData=function(ok)
{
if(ok)
{
var L1=this.firstChild.childNodes.length
trace("Scope="+this.Data["a"]);
for(var i=0;i<L1;i++)
{
trace("Data="+this.firstChild.childNodes*.firstChild.nodeValue);
//i wanna put this data into my _arImages data\\
}
}
//here i wanna call sm other class function
//this.showImage()
//trace("Here Scope="+this);//refers to xml not to my class
}
main.prototype.LoadXML=function(a)
{
this._xml.load(a);
}
var getData=new main();
getData.LoadXML("a.xml");
The XML Structure is :
<data>
<images>a.jpg</images>
</data>
Thanks for any help!