Many thanks to both of you!

I am now constructing the Spite2D and then integrating it inside of an
objectContainer3D object:

                        var bitmap:Bitmap = new ObjIcon();
                        var material:BitmapMaterial = new
BitmapMaterial(bitmap.bitmapData);
                        material.smooth = true;
                        var labelIcon:DirectionalSprite = new 
DirectionalSprite(material);
                        labelIcon.scaling = 12;
                        labelIcon.x = iQ3d.SCALE * meta.x;
                        labelIcon.z = iQ3d.SCALE * meta.y;
                        labelIcon.y = iQ3d.SCALE * meta.z + iQ3d.SCALE * 0.036;
                        objs3D = new ObjectContainer3D(labelIcon);

                        view.scene.addChild(obj3D);

It compiles, but nothing get displayed... Any idea?

On Oct 5, 3:52 am, Darcey Lloyd <[email protected]> wrote:
> Quick cookeup of Sprite3D with Away3D 3.6 using the HandCursor.
>
> URL:http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article....
>
> Features:
>
>    - Click drag to move scene around (HoverCamera3D)
>    - 10 PNG assets used for 10 Sprite3D (MovieClipSprite)
>    - Each sprite has UseHandCursor = true & ButtoneMode = true applied via
>    movieclip
>    - I've placed a cube in the center (untextured to give perspective of
>    elements in the scene)
>
> Happy coding.
>
> Darcey
>
> On 4 October 2010 15:05, Rob Bateman <[email protected]> wrote:
>
>
>
> > yes, just listen for 3d mouse events on the container or scene of the
> > sprite3d objects, and then separate out the various events by using the
> > 'elementVO' property of the returned event, which is a valueobject
> > representing either a face, sprite or segment element. You can easily detect
> > which is which by doing something like
>
> > if (event.elementVO is SpriteVO) {
> >   var mySprite:Sprite3D = (event.elementVO as SpriteVO).sprite;
> > } else if (event.elementVO is SegmentVO) {
> >   var mySegment:Segment = (event.elementVO as SegmentVO).segment;
> > } else if (event.elementVO is FaceVO) {
> >   var myFace:Face = (event.faceVO as FaceVO).face;
> > }
>
> > hth!
>
> > Rob
>
> > On Wed, Sep 29, 2010 at 4:50 PM, rderimay <[email protected]> wrote:
>
> >> Anyone to help on how to make a Sprite3D respond to mouse events??
>
> >> On Sep 28, 9:19 am, rderimay <[email protected]> wrote:
> >> > In Away3D, Sprite2D (DirectionalSprite now) ist not inherited from
> >> > Object3D anymore.
> >> > I used to use these functions:
> >> >         .useHandCursor = true;
> >> >         .addOnMouseDown( );
> >> >         .addOnMouseUp( );
>
> >> > to track user interactivity which now does not work anymore.
>
> >> > Is there any way to get around this problem? Maybe Sprite2D has been
> >> > split in 2 classes, one being DirectionalSprite without user
> >> > interactivity and the second one being something else which I miss?
>
> >> > Many thanks, I am stuck!
>
> >> > Régis
>
> > --
> > Rob Bateman
> > Flash Development & Consultancy
>
> > [email protected]
> >www.infiniteturtles.co.uk
> >www.away3d.com

Reply via email to