[Papervision3D] How to remove planes from scene? (AS2)

Zeh Fernando zehfernando at zeh.com.br
Wed Jun 27 11:03:50 EDT 2007


Hello list,

Anyone knows what's the correct way to remove an object from a scene 
using the AS2 version of Papervision3D?

I'm creating planes this way:

   var fp:MovieClip = (some random movieclip);
   var mt:MovieMaterial = new MovieMaterial(fp, false, {animated:true});
   var pl:Plane = new Plane(mt, PLANE_WIDTH, PLANE_HEIGHT);
   ...
   scene.push(mt);
   scene.push(pl);

However, this is used on a reusable instance, so after a while I want to 
remove the plane and the material as well, to avoid memory waste, and 
replace them with other content.

What would be the correct approach to remove the planes? I had a hard 
time finding an answer to that on the list archives as the AS3 version 
usually takes the spotlight.


Thanks,
Zeh



More information about the Papervision3D mailing list