flex的mxml中有一些LinkButton,怎么能对这些Linkbutton进行循环遍历,代码如下:
<mx:LinkButtonlabel="aa"click="changeQyType('ZGBM',event)"id="aa"styleName="label2"x=...
<mx:LinkButton label="aa" click="changeQyType('ZGBM',event)" id="aa"
styleName="label2" x="20" y="19" />
<mx:LinkButton label="bb" click="changeQyType('SYSC',event)" id="bb"
styleName="label1" x="20" y="59" />
<mx:LinkButton label="cc" click="changeQyType('SYJY',event)" id="cc"
styleName="label1" x="20" y="39" />
<mx:LinkButton label="dd" click="changeQyType('SLSC',event)" id="dd"
styleName="label1" x ="97" y ="40" />
<mx:LinkButton label="ee" click="changeQyType('YXSL',event)" id="ee"
styleName="label1" x="97" y="19" />
<mx:LinkButton label="ff" click="changeQyType('ZLJG',event)" id="ff
styleName="label1" x="20" y="79" /> 展开
styleName="label2" x="20" y="19" />
<mx:LinkButton label="bb" click="changeQyType('SYSC',event)" id="bb"
styleName="label1" x="20" y="59" />
<mx:LinkButton label="cc" click="changeQyType('SYJY',event)" id="cc"
styleName="label1" x="20" y="39" />
<mx:LinkButton label="dd" click="changeQyType('SLSC',event)" id="dd"
styleName="label1" x ="97" y ="40" />
<mx:LinkButton label="ee" click="changeQyType('YXSL',event)" id="ee"
styleName="label1" x="97" y="19" />
<mx:LinkButton label="ff" click="changeQyType('ZLJG',event)" id="ff
styleName="label1" x="20" y="79" /> 展开
2个回答
2012-11-02
展开全部
假设它们的父容器是p
for(var i:int = 0; i < p.numChildren; i++)
{
var c:Object = p.getChildAt(i);
if(c is LinkButton)
{
//
}
}
for(var i:int = 0; i < p.numChildren; i++)
{
var c:Object = p.getChildAt(i);
if(c is LinkButton)
{
//
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询