Question

I'm an actionscript dude - I'm working on a papervision game.

I have an asset of which is 127 pngs in a sequence for an animation.

I can happily project this onto my papervision plane. Problem is, there is no transparency. I Can't use a BitmapFileMaterial as I have many pngs -

can anyone suggest how to do this.

Very very grateful -

Was it helpful?

Solution 3

Reading over google - There seems to be a bug -

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, true, true)

set to

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, false, true)

and later setting

movieMat.movieTransparent = true;

seems to work.


Uber thanks for your help -pointed me in the right direction.

OTHER TIPS

myMaterial.transparent = true

Or something like that, check out the docs if that doesn't work.

this is my code so far. A simplified version edit - Papervision 2.0.0

package com.strangemother.gameObjects
{

    import org.papervision3d.materials.MovieMaterial;
    import org.papervision3d.objects.DisplayObject3D;
    import org.papervision3d.objects.primitives.Plane;

    public class Biorod extends DisplayObject3D
    {
        /*
        My flash movieclip with 127 pngs in sequence
        */
        private var textureMC:BiorodTexture     = new BiorodTexture();
        private var movieMat:MovieMaterial      = new MovieMaterial(textureMC, true, true)

        var plane:Plane = new Plane(movieMat, 300,300,1,1);


        public function Biorod()
        {
            textureMC.id                = 'biorod';
            movieMat.animated       = true;
            movieMat.doubleSided        = true;
        //  movieMat.interactive        = true;
            movieMat.smooth             = true;
            movieMat.movieTransparent   = true; 

            this.addChild(plane);
        }


    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top