[Papervision3D] Q: Access a movieclip in a MaterialsList
Steve Penza
steven at penza.nu
Thu Oct 25 19:25:33 PDT 2007
You could also access the movie property of a MovieMaterial from the
MaterialsList by:
MovieMaterial(<MaterialsListVariable>.getMaterialByName(<MaterialNameString>)).movie[<MovieClipNameString>].addEventListener(MouseEvent.MOUSE_OUT,<HandlerFunction>);
Nuno Morgadinho-5 wrote:
>
> 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
>>
>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
View this message in context: http://www.nabble.com/Q%3A-Access-a-movieclip-in-a-MaterialsList-tf4691546.html#a13419743
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list