cnwerb Posted December 20, 2016 Share Posted December 20, 2016 I want to set visibility = false of a certain child object in a container. How can I do this? Quote Link to comment Share on other sites More sharing options...
xerver Posted December 20, 2016 Share Posted December 20, 2016 I'm not sure I understand the question? child.visible = false Is not working? Quote Link to comment Share on other sites More sharing options...
cnwerb Posted December 20, 2016 Author Share Posted December 20, 2016 4 hours ago, xerver said: I'm not sure I understand the question? child.visible = false Is not working? I have a container object which contains multiple sprites, and I want to set the visibility of a certain sprite to false on certain events, for example mousedown or click. How can I access a specific child object to accomplish this? Quote Link to comment Share on other sites More sharing options...
xerver Posted December 20, 2016 Share Posted December 20, 2016 container.children[0].visible = false The children array is a read-only array (don't modify the array) of the children in the container. Rodrigo 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.