1 Reply Latest reply on Nov 29, 2009 1:58 PM by Rix

    How to update an overlay using a #fromImageObject texture


      Hi there,

      I'm creating a 32 bit image in memory. Creating a newTexture() from the image using #fromImageObject, and adding an overlay to a 3D sprite successfully.


      What I'd like to know is, how do I force the overlay / texture to update every frame (eg a timer), if I have altered the original source image using copyPixels() ?


      I usually do this with #fromCastMember textues via the undocumented "texture.member ="  call if the source is a changing member.image, but I can't find any info how to achieve the same thing with an image object held in memory.


      Much obliged to you experts!


      Richard Smith

        • 1. Re: How to update an overlay using a #fromImageObject texture
          Rix Level 1

          Hi there,


          I've found that the answer was tucked away in one of my books all along.


          Just set the equally undocumented image of the texture to the texture you have just edited using copyPixels every frame...


          textureRef.image = imageRef


          This forces the overlay to update. Thanks to Paul Catanese's superb book "Director's Third Dimension" for that one (no I'm not his literary agent).


          As general advice, I'd say this is the ONLY book I'd consider worth owning for shockwave3D work.




          Richard Smith