Professional Web Applications Themes

Deleting all the children of an object - Macromedia Director 3D

Is there ANY function or technique I should know about that will get rid of all of the children of a model? In my game there are different objects which are cloned from outside the game area whenever they're needed... I've already written a script with a FOR loop that deletes all of its children manually when it's time to remove the object, but unfortunately some of them also have lights as children and the lights don't get included in the list of children for some reason (even though they definately move with the parent just like regular children). What ...

  1. #1

    Default Deleting all the children of an object

    Is there ANY function or technique I should know about that will get rid of all
    of the children of a model? In my game there are different objects which are
    cloned from outside the game area whenever they're needed... I've already
    written a script with a FOR loop that deletes all of its children manually when
    it's time to remove the object, but unfortunately some of them also have lights
    as children and the lights don't get included in the list of children for some
    reason (even though they definately move with the parent just like regular
    children). What can I do? I can't even hard-code this, since the name of the
    light is different every time I clone its parent...

    RavenWorks Guest

  2. #2

    Default Re: Deleting all the children of an object

    RavenWorks wrote:
    > Is there ANY function or technique I should know about that will get rid of all
    > of the children of a model? In my game there are different objects which are
    > cloned from outside the game area whenever they're needed... I've already
    > written a script with a FOR loop that deletes all of its children manually when
    > it's time to remove the object, but unfortunately some of them also have lights
    > as children and the lights don't get included in the list of children for some
    > reason (even though they definately move with the parent just like regular
    > children). What can I do? I can't even hard-code this, since the name of the
    > light is different every time I clone its parent...
    >
    You may loop through the lights checking for their parent. If they have
    as parent the node you want to delete, then you get rid of them.

    HTH,
    --
    Agustín María Rodríguez | Interactive Director
    Methanoia Studio | [url]http://www.methanoia.com[/url]
    ---------------------------------------------------
    [url]www.onwine.com.ar[/url] > samples & code
    Agustín María Rodríguez Guest

Similar Threads

  1. pulling in children of children in XML
    By flipflop9 in forum Macromedia Flash Data Integration
    Replies: 4
    Last Post: September 27th, 10:11 AM
  2. Deleting an Object
    By taran420 in forum Macromedia Director 3D
    Replies: 0
    Last Post: November 23rd, 08:50 AM
  3. understanding object parents and there children
    By Roofy in forum Macromedia Director 3D
    Replies: 4
    Last Post: April 13th, 04:29 PM
  4. Deleting an Instance of an Object during Runtime
    By equinox007 webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: January 21st, 08:27 AM
  5. Deleting an open database object
    By Michael Stevens in forum Microsoft Access
    Replies: 0
    Last Post: July 14th, 11:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139