views:

233

answers:

3

Hey guys.

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 -

A: 

myMaterial.transparent = true

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

Tyler Egeto
doesn't exist for movie materials
Glycerine
Did you look in the docs? try myMc.movieTransparent = true;
Tyler Egeto
I did try that, I may be implementing it wrong but it doesn't work - I saw on papervision 3d other people have had trouble with that too.
Glycerine
Can you post your code? Try setting it through the constructor function as well, rather than after.
Tyler Egeto
A: 

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);
        }


    }
}
Glycerine
A: 

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.

Glycerine