3 Replies Latest reply on Jun 24, 2006 6:28 AM by James Newton, ACP

    Help texture

    merlinkes
      Spanish translate to the English with google.
      Good morning not to add to textures or (*.avi, *.mov) to an object 3d from director(lingo), help me with an example.
      thanks.
        • 1. Re: Help texture
          James Newton, ACP Level 3
          Here's a script that you can use to animate a texture using a pre-defined list of images:

          -- ANIMATED TEXTURE --
          -- Parent Script
          --
          ----------------------------------------------------------------------
          -- This instance will cycle through the images in plImages, changing
          -- the image of the given texture once per frame.
          ----------------------------------------------------------------------



          -- PROPERTY DECLARATIONS --

          property pTexture -- 3D texture object
          property plImages -- list of images for texture cycle




          -- PUBLIC METHODS --

          on new(me, aTexture, anImageList) ------------------------------------
          -- INPUT: <aTexture> must be a texture object
          -- <anImageList> must be a list of image objects containing
          -- at least one item
          -- ACTION: Adopts the texture and the list of images
          -- OUTPUT: Returns a pointer to this instance
          --------------------------------------------------------------------

          pTexture = aTexture
          plImages = anImageList

          (the actorList).append(me)

          return me
          end new



          on Finalize(me) ------------------------------------------------------
          -- ACTION: Clears all circular references
          --------------------------------------------------------------------

          (the actorList).deleteOne(me)
          end Finalize



          on stepFrame(me) -----------------------------------------------------
          -- ACTION: Cycles through the available images.
          --------------------------------------------------------------------

          vImage = plImages[1]
          plImages.deleteAt(1)
          plImages.append(vImage)

          pTexture.image = vImage
          end stepFrame



          This link might also be helpful: http://www.macromedia.com/devnet/director/articles/streaming_video.html
          • 2. Re: Help texture
            merlinkes Level 1
            Spanish translated with google.

            Thanks, but I like to know to me are like putting a texture animated (*.avi) in an object w3d mattered.
            Thanks.
            • 3. Re: Help texture
              James Newton, ACP Level 3
              As far as I know, you cannot use *.avi or *.mov or *.wmv to create an animated texture. The reason for this is that you do not have access to the .image property of these digitalVideo types; to animate a texture, you need an image or a member with an .image property.

              You can use Flash or RealMedia video, because Director gives you access to this .image property.