Flash 容器中的Flex-detect元素
如何检测容器中是否有任何元素 示例代码:Flash 容器中的Flex-detect元素,flash,apache-flex,Flash,Apache Flex,如何检测容器中是否有任何元素 示例代码: <s:VGroup id="myGroup"></s:VGroup> if(myGroup.getElementAt(0)){ //Got element inside }else{ //Nothing inside } 如何检测是否有任何元素加载到VGroup中 谢谢。使用酒店 if(myGroup.numChildren > 0){ //Got element inside }else{
<s:VGroup id="myGroup"></s:VGroup>
if(myGroup.getElementAt(0)){
//Got element inside
}else{
//Nothing inside
}
如何检测是否有任何元素加载到VGroup中
谢谢。使用酒店
if(myGroup.numChildren > 0){
//Got element inside
}else{
//Nothing inside
}
虽然答案很简单,但我不确定自己是否理解这样做的理由。为什么你的“父母”需要反省孩子?
if(myGroup.numChildren > 0){
//Got element inside
}else{
//Nothing inside
}