PV3D: Accessing Cube Materials & MovieMaterials

Two snippets for people who want to handle PV3D primitives like cubes, planes or spheres. The solutions are quite basic, but badly documented and hard to find.

Change a cube’s materials:

    cube.replaceMaterialByName(material, "top");

Access (play, stop, gotoAndPlay, etc.) the MovieClip inside of a MovieAssetMaterial / MovieMaterial

    MovieClip(material.movie).gotoAndPlay(1);

Good to know.

2 Thoughts.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>