I am having an interesting time trying to get some looping if statements to work.
The main culprit I THINK are those parentheses.
Without them it doesn’t work at all.
With them only the trace statement will work, but only if I comment out the other stuff. Other wise all I get is this wierd “value is not a function” error.
Could someone please drop some knowledge on me for how this syntax works?
!!!Thanks!!!
Code:
function TestLoop(e:Event):void
{
- for (var n:Number = 0; n<xmlList.length*[SIZE=5]()[/SIZE]; n++)
{
if (xmlList[n].attribute(“locked”) == “yes”)
{
** trace (“locked”);**
xmlList[n].removeEventListener(MouseEvent.CLICK, onSelected);
xmlList[n].removeEventListener(MouseEvent.MOUSE_OVER, onOver);
xmlList[n].gotoAndStop(2);
}
else
{
trace (“not locked”);
}
} - }*