Apache flex 基于变量&x27;灵活访问ArrayCollection中的节点;s值

Apache flex 基于变量&x27;灵活访问ArrayCollection中的节点;s值,apache-flex,arraycollection,Apache Flex,Arraycollection,我需要一些帮助来访问Flex3中arrayCollection中的值 var f:字符串 我需要访问photoFilePath,其中series=f。如果f=2,那么我需要/pics/my2.png 所以,伪代码:myAc.(series=“f”).photoFilePath <mx:ArrayCollection id="myAC"> <mx:Object label="Label 1" series="1" photoFilePath="/pics/my1.png"

我需要一些帮助来访问Flex3中arrayCollection中的值

var f:字符串

我需要访问photoFilePath,其中series=f。如果f=2,那么我需要/pics/my2.png

所以,伪代码:myAc.(series=“f”).photoFilePath

<mx:ArrayCollection id="myAC">
    <mx:Object label="Label 1" series="1" photoFilePath="/pics/my1.png" pageTitle="First"/>
    <mx:Object label="Label 2" series="2" photoFilePath="/pics/my2.png" pageTitle="Second"/>
</mx:ArrayCollection>

任何建议

多谢各位

-Laxmidi
var n:int=myAC.length;
var n:int = myAC.length;
var f:String;
for (var i:int = 0; i < n; i++)
{
    var item:Object = myAC.getItemAt(i);
    if (item.series == f)
    {
        trace(item.photoFilePath);
        break;
    }
}
var f:字符串; 对于(变量i:int=0;i
嗨,马克西姆,非常感谢。这非常有效。我学到了一些新东西。