MovieMaterial not updating properly

Software: Away3D 3.x

kamcknig, Newbie
Posted: 01 August 2011 09:13 PM   Total Posts: 2

Hi Everyone,

I’ve got a MovieMaterial attached to a sphere currently. The MovieMaterial gets it’s bitmap texture from a MovieClip that has a bitmap in it. Inside of this MovieClip I add some colored circles. It appears fine on the sphere, but then when I loop through the children later on the MovieClip and remove these circles and then update the MovieMaterial, only some of the points are removed and not all of them. If I run the function that clears the points multiple times, more and more get removed as it goes. But it never seems to update fully the first time. I’m 100% sure that all of the circles are being removed from the MovieClip source.

Kyle

   

Richard Olsson, Administrator
Posted: 02 August 2011 07:05 AM   Total Posts: 1192   [ # 1 ]

Are you really 100% sure? Because if the bitmap is updating (which obviously it is since you’re seeing a change) then it’s simply using the built-in draw() method which will draw the clip exactly as the Flash Player would see it.

What’s the code that you’re using to remove all the children? Could it be the good old removing-every-other-child issue? Try using the following code to remove all the children (unless you’re using a version of the player that has removeAllChildren()).

while (clip.numChildren)
  
clip.removeChildAt(0); 
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X