How can I remove all the children from scene to a given index position?

Hello

I created a simple game - when the game ends, I want to remove only some of the children from the scene and let some interface elements behind.

The children I want to delete, I added at the level of the index 6.

My code to add child objects to the start looks like this:

addChildAt(newObject,6);

Then, when the game is over and I need to clear the screen of all these objects table laid, I want to delete all the child objects to the index position 6 only, while the other elements of the scene are left intact.

I don't know how to use a while loop to remove all children from the scene, but do not know the syntax to remove all children from a given only depth index position.

My gameOver() function is currently using this code:

getChildAt (6);

removeChildAt (6);

but this removes an instance of one child.

I must be able to detect all children at index 6 and remove them all.

I can't find the syntax necessary to achieve this.

Can anyone help?

Advertisement

A single object can occupy a level of the index.  When you add another at the same level, the previous is moved up in the order.  You probably want to do is to store the references to these children in a table and use it to target out them.

Tags: Adobe Animate

Similar Questions

  • How can I remove all the files from adobe?

    How can I remove all THE files from Adobe? Including apps, preferences and all folders containing old items. Thank you!

    Use of the Adobe Creative Cloud cleaning tool to solve installation problems can help

  • How can I remove all the info from WMP rocket?

    Hello

    Recently, I synced my rocket to WMP and ripped CDs. But now when I plug my rocket in everything I see when browsing the content are the CD I ripped and not the music files that are also out there (who are not torn, just mp3 files). I went to the 'end sync partnership', a box came and I clicked 'yes '. But when I plug it again all I can see is the CD I ripped just once again. How can I remove all traces of my "rocket" from the computer? I'm out of ideas.

    Thanks in advance, I hope you can help and that I explained myself properly

    Huge wrote:

    Hi, thanks for your response. Yes, I'm looking through windows Explorer. And the USB mode is automatically detect. I don't know what means MTP or MSC?

    but you're right, I don't care if I could see all the files at once.

    The problem is that when you use Auto detect mode the computer chooses what USB mode to connect to the computer. So, if your using WMP it uses MTP mode, but if your use drag and drop will use MSC mode, and when you connect to your computer you can see what has been added in the mode that you are connected to. So if you connect in MSC it is unclear to which has been added to PSG. If you want to add a lot of files with WMP, I'd say he bets on PSG here and let (you can use the drag and drop in PSG too).

    To ensure that you can see everything that you can format your drive and then go to settings > system settings > USB Mode > PSG > press the Center button, and then reload the player.

  • How can I remove all the unused files to clear a space

    How can I remove all the unused files from my computer

    You can remove applications on the control panels.  XP seems to me (im not on a XP ATM machine) programs cpanel

    Files?  you do not (or should not) delete separately

  • How can I delete all THE pictures from the Iphone 6?

    I am trying to remove all the photos from my Iphone 6. I have had no luck with one of the methods I've tried, including the phone for the Mac, excluding photos of synchronization.

    You have iCloud library enabled? If so photos can be rear sync. If this is not the case, try first to reset the Photos App close pictures completely from the window of the selector app by double clicking the Home button and slide up the photo preview pane until it disappears from the display. Then perform a forced reboot. Hold down the Home and Sleep/Wake buttons simultaneously for about 15-20 seconds, until the Apple logo appears.

    Then open the pictures, select Albums, select Camera Roll, then click Select and run your finger through all the photos you want to delete.

    If the above does not help, please detail what you've already tried. As you noted, photos synced from your computer only can be deleted by "unsyncing" their new.

  • How can I remove all the pieces of Apple's music added to my library?

    I went through the free trial and then two months of Apple's music. I do not simply continue to pay monthly fees. However, for the five months I had Apple music I added a lot of albums to my music I can play them from my iPhone in my car. In any event I am now having to look and try to find the albums or songs, I added one at a time to remove them. It's infuriating. Is there a way to remove all Apple music from my music library at the same time?

    On the tab my music toggle the display of the Album song. Then right-click on the column headers and check that 'iCloud status' is checked. Then click this column to sort your music based on iCloud status. Locate the first track 'Apple Music', click it, scroll to the last piece of music from Apple and shift click to highlight all the music from Apple. You can finally do a right-click the selection and click on Remove to remove all Apple music songs recorded.

  • How can I transfer all the files from an iPad earlier to a new iPad pro?

    I'm considering buying an iPad pro and want to transfer all the files from my iPad generation (big connector) prior to the new.

    Is it possible directly, and is there a cable to connect the of LIGHTNING current in style making earlier?

    Or it's done via WiFi?

    You have a computer?

  • How can I remove all the features of internal home network security?

    I have no need to prevent someone from my network home to access anything whatsoever.  But that I will constantly meet problems with passwords are required or printer is 'offline' when they aren't or blockages of other types of intrusion, forbidding me other computers on my network.  I am the administrator of networki here and I have no idea how to deal with this...  How can I simply delete all these security steps so I don't not all those pesky problems all the time?  I did everything on every computer that I can find to do.  Is there a security overall unique command disabling?

    Hello

    1. what operating system work?

    2 have you made changes on the computer before this problem?

    3 work on a wired or wireless network?

    4. what security software you have installed on your computer?

    If you use Windows 7 follow the mentioned suggestion:

    The problem with programs or you being blocked, you can see the following article on how to add exceptions to the firewall.

    http://Windows.Microsoft.com/en-us/Windows7/open-a-port-in-Windows-Firewall

    To save the password on some cases, you can use Credential Manager.

    http://Windows.Microsoft.com/en-us/Windows7/what-is-Credential-Manager

    See also:

    http://Windows.Microsoft.com/en-us/Windows7/taking-control-of-computer-security

    Hope the above information is helpful.

  • How can I copy all the content from my old hard drive on my hard drive again?

    My old PC is on its last breath and I decided to replace it. I bought a new more powerful PC and thought that by installing my old hard drive (Windows 7 on a Sata Drive) be simple and give me all my current programs without the need to install again. Unfortunately, my new PC refuses to recognize the old drive and I need these programs. How to copy all the contents of a new (bigger hard disk) without loss of functionality.

    Any help greatly appreciated

    Original title: old to new hard drive

    Remove the old drive, (just unplug its cables) reboot the PC, it does not start?

    If the method of connection of the old drive was at fault

    (Or bother readers origonal connections when you installed the old disk)

    BTW, you can not use the old drive as primary boot on your new PC drive, or you can access all the programs that have been installed on this subject.

  • How can I remove all the libraries?

    When install muse downloaded adobe many libraries now works muse bad adobe. Tell me how I can remove all library quickly and efficiently.
    Thanks in advance

    Delete the files in library of Muse = drag to the location

  • How can I get all the files from the hard drive in the non-working Compaq Presario CQ62-411NR

    Ice tea seep keyboard laptop, and after drying it feeds on. If I try a hard reboot, it is stated that I would lose all the info in the memory and I can't afford to lose my mother pictures that are on the hard drive. Is it possible to get the hard drive to work in some other way so that I can get my photos and other files.

    You can remove the hard drive and put it in a USB Enclosure.Plug USB port, another machine, where you should be able to go through it and copy your photos off on the hard drive of the host computer.

    Example:

    http://www.TigerDirect.com/applications/SearchTools/item-details.asp?EdpNo=3743052 & catid = 2783

  • How can I remove all the errors and warnings Event Viewer administrative events, Application & system options?

    Please I need to remove these errors and warnings permanently on my computers?
    And please tell all the ways to get rid of these errors and warnings in Event Viewer... I'm waiting...

    You can clear the logs in the event viewer by going to the various sections, right-click and selecting "clear logs.

    What you can't do, is remove the event viewer or stop newspapers appearing again. It is part of the Windows 7 kernel and is useful to diagnose errors...

  • How can I transfer all the emails from the old hard drive to a new hard drive, Windows 7

    This transfer of e-mail has some quirk to it.  I am running Windows 7 Professional on a concert of 150 old drive raptor WD with Internet Explorer and Outlook Express.  I'll be installing Windows 7 Professional on the new drive and running Mozilla Firefox and Thunderbird and the need to pass all the information the browser and e-mails (with folders) to the appropriate place on the new drive.  I will use the same Windows 7 Professional disk for the operating system on the new drive, and then the old drive will be trashed as soon as the transfer is completed.  What is the best way to transfer the data since I use two different browsers and e-mail clients?  Do I first transfer all on the same type of browser and e-mail on the new disk and then import in Mozilla Firefox and Thunderbird, or can I do a direct transfer to them?

    Hey there James :)

    If your original WD Raptor drive is in good health, have you considered cloning it to the new drive and so keeping everything as it is without the need to reinstall and backup and restore your data to the e-mail and other applications? I suggest to check out Acronis True Image WD Edition for this procedure: http://products.wdc.com/support/kb.ashx?id=st8xw8
    I would first of all check if the drive is healthy, as the procedure could transfer some potential errors from the old drive to the new. I would recommend running tool WD Data Lifeguard Diagnostic to check the status of the WD Raptor drive. Here's a link: http://products.wdc.com/support/kb.ashx?id=p7VtBy

    After the back if you have any questions!

    Captain_WD.

  • How can I remove all the stain placed on a picture?

    I have several photos that somehow got all the spotting place I applied the day before in various places, spread over the photo. I don't know why this happens, this is my 3rd time. I would like to reset, but there are other settings that I don't want to lose.

    Thank you.

    If you have enabled spot removal tool, there a reset button in the Control Panel tool that you can use to reset all of the stain. I'm not sure what happened in your case, but you must ensure that you have not enabled with several image when you use the automatic synchronization tool. If auto sync is enabled then the spot removal tool will apply to all images exactly the same places.

  • Can I remove all the images from my iPhone through Photos on my Mac

    Can I delete/move all the photos and videos in my iPhone via Photos and replace selected those?

    With iCloud photo library

    Get help with your photo library - Apple Support iCloud

    Hope this helps

Maybe you are looking for

  • Tungsten T3 Hot Sync in Windows 7 Ultimate 64-bit and WIndows XP mode

    I've upgraded to Windows 7 Ultimate 64 bit and now my Palm T3 will not be synchronized.  I downloaded desktop 4.1.4e 6.3 and 4.1.4. I tried all three in both windows 7 and windows XP mode that tells me is a 32-bit o/s but I'm really not sure.  I trie

  • Lenovo, Yoga Pro 1370 - backlit 3 does not

    Hello! I bought a Lenovo Yoga 3 Pro, but the keyboard backlight seems to not work. I tried Fn + space with no luck. I tried to update via the parameters of Lenovo, but it takes a hundred years. I also installed the latest drivers, no luck. What can I

  • Porting to ARM LM3S811, basic PWM i/o issues

    Hi allOK, so quickly, I take back what I did: -The LM3S811: http://www.luminarymicro.com/products/ekk-lm3s811_evaluation_kit.html -J' used the generic LM3Sxxxx to create one forthe LM3S811 by following the instructions in the porting guide for other

  • Acquisition of data reading too fast in the loop For

    I am trying to characterize a system with a VI that sets the speed of a motor, waits 7 seconds go upward, then take 200 readings calculates their.  The sampling frequency is 20 Hz, with 200 samples, it should take 10 seconds.  The program then loops

  • I need a power monitor for HP2711X. Where can I buy one?

    I need a power monitor for HP2711X. Where can I buy one?