Li : Dev Actionscript Development Blog

13Jul/09Off

Extruding TextField3D

We've added a simple class that provides extrusions for TextField3D objects. Right click on the demo to see the source and learn how to use the feature.

UPDATE: Properties "textColor" and "textAlpha" have been replaced by "material". Since TextField3D supports various material types now, these two properties are not applicable any more.

Away3D currently supports all the basic color materials on irregular shapes like these. You can use WireColorMaterial, ColorMaterial, WireframeMaterial and ShadingColorMaterial on vector text and vector graphics coming from Flash.

There is still a lot of work to do, but we're getting there!

Filed under: 3D, Tutorials Comments Off
Comments (9) Trackbacks (0)
  1. Is it a problem in your everyday life to have too much talent ??

  2. WOW
    Man What do you eat?!

  3. Got it working. This is crazy badass!

  4. Ok two questions:
    1) my text clips when nearing the edge of the SWF. the character essentially disappears if it touches the edge

    2) any way to make it .interactive = true so I can make them buttons?

  5. Hey Marc,

    1) Incorrect clipping near the edges is something I need to fix next time I get a chance to work on this.
    2) I think Rob Bateman has added interactivity to textfields, why don’t you post this on the Away list so he can tell us how to use it?

  6. Li,
    Thanks for the quick response. Yes please do let me know when the clipping is fixed. I’m using your great work to do some fun typography stuff for my new company website.

    All the best,
    Marc

  7. Hello,

    I could not set the color of the extruded text. It appears to be different color each time i start the swf.

    also where can we get support for away3d

    All the best,
    Can

  8. @wintermute:
    I extended the extrudeMesh function to set the material of the extruded mesh. Just change this to your code:

    e.g.
    extrudeMesh(textfield2, 3, 1, false, new ColorMaterial(0xA02860));

    private function extrudeMesh(mesh:Mesh, subdivisionsXY:uint = 1, subdivisionsZ:uint = 1, bothsides:Boolean = false, material:ITriangleMaterial = null ):void {

    extrusion.material = material;

    }

No trackbacks yet.