|
| samothtronicien |
Post
#1
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
Hello,
I have som difficulty to remove an object that i add to a group dynamically. I've tried remove(), destroy(), and other tricky codes, but nothing seems remove the object from the scene. Someone has ever been able to remove an object ? (IMG:style_emoticons/default/biggrin.gif) Thanks. |
| kyuzo |
Post
#2
|
|
Advanced Member Group: Members Posts: 46 Joined: 19-June 06 Member No.: 18 |
try something like parent.getChildList().splice(...); it worked for me.
|
| samothtronicien |
Post
#3
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
Yes i've tried also to pop the last child, so the object is not anymore in the group, but still rendering like a zombie ...
There is something i have not understood (IMG:style_emoticons/default/sad.gif) thx anyway This post has been edited by samothtronicien: Apr 24 2007, 05:19 PM |
| kyuzo |
Post
#4
|
|
Advanced Member Group: Members Posts: 46 Joined: 19-June 06 Member No.: 18 |
well, it works for me. maybe send some code?
|
| samothtronicien |
Post
#5
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
I have write a little example, it is in attachment.
I draw line between the center of the scene and the center of the sphere, and as you can see the previous lines are not erase. This post has been edited by samothtronicien: Apr 24 2007, 08:38 PM Attached File(s) |
| kiroukou |
Post
#6
|
|
Administrator Group: Root Admin Posts: 930 Joined: 12-June 06 Member No.: 1 |
AsI told you, I think there's a typo error on one of the remove method...
I noticed that during the AS3 port, but forgot to fix it in AS2 I guess.. :s that's the best place to look at anyway (IMG:style_emoticons/default/smile.gif) ++ |
| samothtronicien |
Post
#7
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
I
think i have found, when we destroy (object3D method) we forgot to
remove the movieClip, so i had a container.removeMovieClip(), and it
works.
|
| kyuzo |
Post
#8
|
|
Advanced Member Group: Members Posts: 46 Joined: 19-June 06 Member No.: 18 |
the code you've sent is working as you expected for me; or maybe i've misunderstanded something.
(built with sandy 1.2 beta) |
| samothtronicien |
Post
#9
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
You have only one line3D at a time ?
Very strange ... because without the removeMovieClip you have to see all the lines (even if there are not in the rendering tree). This post has been edited by samothtronicien: Apr 24 2007, 10:07 PM |
| kyuzo |
Post
#10
|
|
Advanced Member Group: Members Posts: 46 Joined: 19-June 06 Member No.: 18 |
|
| samothtronicien |
Post
#11
|
|
Member Group: Members Posts: 25 Joined: 23-August 06 Member No.: 326 |
(IMG:style_emoticons/default/blink.gif) Lol
edit : Ah! I've checked the code 1.2 beta, and it'sa bit different in the 1.2 beta 2, this is probably why you just make the code working and me not. This post has been edited by samothtronicien: Apr 24 2007, 10:15 PM |
| Lo-Fi Version | Time is now: 22nd August 2007 - 08:02 AM |