Update: I was wrong about the textfield3d not receiving light, I just
had to play with materials/light settings..

I am using the trunk off of svn from a couple of days ago -- does
anyone know why textextrude needs to use the textfield3d material ?
Changing it at any point does not actually change the material.

On Mar 11, 3:00 pm, mikerz <[email protected]> wrote:
> Hi all, I tried to post in the december post about textextrude/
> textfield3d but it hasnt gone through.
>
> I used the exact code provided there at one point, to no success. It
> appears that in the current build, it is not possible to set a
> different material for textextrude versus textfield3d.
>
> Currently, I am using this code to create both:
>                 protected function init():void
>                 {
>                         tf3d = makeFace(_text);
>                         te = makeExtrusion(tf3d);
>
>                         this.addChild(tf3d);
>                         this.addChild(te);
>
>                         trace("ExtrudedTextField::",tf3d,te);
>                 }
>                 protected function makeFace(str:String):TextField3D
>                 {
>                         VectorText.extractFont(_fontfile, [_font], true);
>                         var tf3D:TextField3D = new TextField3D(_font,_init);
>                         tf3D.text = str;
>                         tf3D.material = this._mat;
>                         tf3D.ownCanvas = true;
>                         tf3D.pushfront = true;
>                         return tf3D;
>                 }
>                 protected function makeExtrusion(tf3d:TextField3D):TextExtrude
>                 {
>                         var te:TextExtrude = new TextExtrude(tf3d,_init);
>                         te.pushfront = false;
>                 //      te.alpha =.5;
>                         te.material = this._emat;
>                         te.ownCanvas = true;
>                         return te;
>                 }
> This functionality is great and works well -- I'm impressed at how
> easy it is to work with, but I only wish to be able to set a different
> material for these two distinct pieces of extrusion.. Also, if I use
> ShadingColorMaterial, it seems that the textfield3d receives no light
> whatsoever and is rendered as black.
>
> Please, and help in regards to this issue would be appreciated.
>
> -Michael

Reply via email to