[Papervision3D] Q: Access a movieclip in a MaterialsList
Nuno Morgadinho
nuno.morgadinho at ydreams.com
Thu Oct 25 08:29:12 PDT 2007
You probably want InteractiveMovieMaterial() instead.. something like..
var material:MovieMaterial = new InteractiveMovieMaterial(mc, true);
material.oneSide = true;
material.animated = false;
var movieSprite:Sprite = Sprite(material.movie);
movieSprite.addEventListener(MouseEvent.CLICK, callFunction);
--
Nuno Morgadinho
http://www.dreaminginflash.com/
moveup at mac.com wrote:
> Hi
> I have a Materials list for a cube and I want to access the movieclips used for the MovieMaterial(s) in this list.
>
> Does this make any sense?
>
> In the following 'mc' is a previously created MovieClip.
>
> //code
> var materials:MaterialsList = new MaterialsList(
> {
> //all:
> front: new MovieMaterial( mc,false, true ),
> back: new MovieMaterial( mc,false, true),
> right: new MovieMaterial( mc,false, true ),
> left: new MovieMaterial( mc,false, true),
> top: new MovieMaterial( mc,false, true ),
> bottom: new MovieMaterial( mc,false, true )
> } );
> //code end
>
> I want to add a listener to either 'mc' above, OR a child of 'mc'
>
> This doesn't work:
> materials.front.movie["child"].addEventListener(MouseEvent.CLICK, handleBTNClick);
>
>
> Any suggestions?
>
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> --------------------------------------------
> "...all improvisation is life in search of a style."
> - Bruce Mau,'LifeStyle'
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
More information about the Papervision3D
mailing list