[Papervision3D] MovieMaterial and getChildByName
Trevor Burton
worldofpaper at googlemail.com
Thu Nov 15 11:53:23 PST 2007
because the movie property is an instance of DisplayObject.... not Sprite or
above - which have a getChildByName method... so you'll need to cast the
movie to Sprite or Movieclip before calling getchildByName()
(moon.material.movie as MovieClip).getChildByName("spot");
i think... could be wrong, though
T
On Nov 15, 2007 7:46 PM, xero <xero.nu at gmail.com> wrote:
> i'm having some problems myself...
>
> i've created a 3D sphere and mapped
> a very large JPG to it (working great)
>
> so i took the JPG and threw it into FLASH
> CS3, and made a simple movie, with the
> background JPG and another movieclip.
>
> i want the other movie clip to work as a
> hotspot. so im working in flex3 right now,
> using MXML, but im not against using
> pure AS3. (but i dont want to use just CS3)
>
> the problem im having it finding that other
> movie clip w/in the material...
>
> ok heres some code...
>
> [code]
>
> [Embed(source="assets/surface4.swf")]
> private var map:Class;
>
> var surface = new MovieMaterial((new map() as Sprite), false, true);
> var btn = surface.movie.getChildByName("spot");
>
> [/code]
>
> the first part works fine. creating a moviematerial
> and using it works. but i cant seem to use getChildByName.
> it dousnt popup under intelesence...
>
> so i tried getting it from the object, not the material directly.
>
> [code]
>
> var moon = new Sphere((new bump() as Sprite), 124, 18, 18);
> moon.material.movie.getChildByName("spot");
>
> [/code]
>
> but the same problem arises...
> what am i doing wrong?
> ____ ___
> \ \/ /___________ ____
> .\ // __ \_ __ \/ _ \
> ./ \ ___/| | \( <_> )
> /___/\ \___ >__|---\____/
> | \_/ \/ |
> | xero harrison |
> | x at xero.nu |
> | http://xero.nu |
> | http://fontvir.us |
> | http://xero.owns.us |
> `---------------------'
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
Trevor Burton
http://www.paperworld3d.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20071115/48ebdee9/attachment.html
More information about the Papervision3D
mailing list