Hi all
I am writing a code like this:
if (true)
{
myData = this.firstChild;
//trace("XML Contents = " + this.firstChild);
//trace(“XML Children =” + myData.childNodes);
var myArr = new Array(4);
//trace("Date = " + myData.childNodes[0]);
myArr[0] = myArr.push(myData.childNodes[0]);
for(i=1;i<4;i++)
{
//trace(“pkg " + i +”: "+myData.childNodes*.firstChild);
myArr* = myArr.push(myData.childNodes*.firstChild);
}
myArr.reverse();
trace(myArr);
if(contains(“1.pkg”,myArr)==1)
{
trace(“1.pkg is present”);
}
else
{
trace(“1.pkg is not present”);
}
}
};
I have two problems here:
1.When I am creating an array of size 5…in the output I am able to see 10 values in which 5 are correct and the other 5 are junk values…??Why is this happening so…?
2.When I am searching for a value called 1.pkg…It is showing me that it is not present in the array…but 1.pkg is still present in the array…?
Can anyone help me in getting out of this…??