This content has been marked as final. Show 5 replies
I think in AS you need to refer to your objects using their identifier, not their ID. So use vBoxContainer.
In this case you also need to declare the VBox object vBoxContainer outside the function, as you refer to it in another function.
That makes sense, but now I've lost the buttons! I can make them appear outside vBox1, but not inside. Why won't they appear for me?
You are not adding the vbox to the Application displayList. Do it like you do the button, new(), then addChild()
Consider Repeater for this instead of manual addChld();
OK, I see that I need to add the HBox to the displayList, but now I cannot erase the buttons because the deleteButtons function does not have access to vBox1 which was created in the function start() (see below).
Please tell me the right way to do this. Thank you so much!!
Ok, solved my problem. I needed to define
var vBox1:VBox = new VBox();
outside the function.