And when I use this:
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();
objs3D.addSprite(labelIcon);
it is displayed on the scene, but not clickable...
On Oct 4, 4:05 pm, 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]