2
A
回答
0
您可能還需要設置你的組件上的「名稱」屬性,如:
myLabel.name = "LabelX";
myLabel.id = "LabelX"; // eventually
然後繼續作爲第一個答案說,這樣做,
yourVBOX.removeChild(yourVBOX.getChildByName('LabelX'));
的要記住的是要設置名稱以及ID,沒有像「getChildByID」這樣的方法:-)
1
的removeChild之函數刪除假設你知道的名字實物您VBOX運行時之前:
yourVBOX.removeChild(yourVBOX.getChildByName('yourChildID'));
1
如果你要刪除的孩子的id,你有真正的對象。在mxml
中的id
屬性通過它的值創建一個公共變量並存儲對該變量中對象的引用。
if(childId != null)
vbox.removeChild(childId);
else
trace("Normally this shouldn't happen in flex");
//or if you don't have VBox's id but you are sure that
//the child is in fact is parented by a container:
childId.parent.removeChild(childId);
-1
getChildB雲南發展培訓學院:
this.getChildren()[id]
+0
你的意思是'this.getChildren()[index]',但他有id,而不是索引。 – 2011-06-27 17:27:56
3
var elem:Type_of_E = this["constructed_id_of_E"];
相關問題
- 1. 從servlet獲取對象flex
- 2. 使用ModelBinder的由ID獲取對象
- 3. 在C++中獲取對象ID
- 4. 在mongolite R庫中獲取對象ID
- 5. Django - 在render_change_form(ModelAdmin)中獲取對象ID
- 6. 在Django中通過id獲取對象
- 7. 使用jquery獲取在rails中創建的對象的ID
- 8. 如何在創建對象時在after_filter中獲取對象ID?
- 9. 核心數據 - 使用keypath和對象ID獲取對象
- 10. 通過id()獲取對象?
- 11. 如何在保存Mongoose中的對象後獲取對象ID?
- 12. Flex獲取畫布ID?
- 13. 從參考ID獲取對象Id
- 14. 獲取使用Flex
- 15. Flex獲取Hgroup的第一個對象
- 16. 從repeater對象獲取文本 - flex
- 17. Parse.com用Swift獲取對象ID
- 18. Django獲取保存中對象的ID()
- 19. 獲取ActiveAdmin/Formtastic中父對象的ID
- 20. 獲取路由中父對象的ID
- 21. 獲取對象的ID在views.py
- 22. 獲取對象ID在nfcpy庫(蟒蛇)
- 23. 使用mongoDB中的id數組獲取對象
- 24. 如何在使用ClusterManager時獲取每個Marker對象ID
- 25. 如何在使用toggleProperty時獲取對象的id
- 26. Restangular - 獲取對象W/ID,編輯對象,更新對象
- 27. 如何在Flex中獲取和設置動態對象?
- 28. 在flex中獲取對象屬性值的問題
- 29. AMFPHP如何在由flex調度的php中獲取對象?
- 30. 如何通過propel對象集合中的「id」獲取對象?
我想他是指他的ID作爲一個字符串...作爲,在一些程序算法給了他一個元素的ID,而不是他需要知道如何訪問控制。 – 2011-06-27 17:29:28