MovieMaterial with hand cursor

76 views
Skip to first unread message

gabon

unread,
Jan 24, 2008, 4:58:31 AM1/24/08
to away3d.dev
Hi guys, I'm trying to have the same cursor effect on
http://www.airtightinteractive.com/projects/tiltviewer/app/ (in
papervision I couldn't), I tried:

var plane : Mesh = new Plane();
plane.material = new MovieMaterial(createContent(),
{interactive:true});

with

private function createContent() : Sprite
{
var mc : Sprite = new Sprite();
mc.name = "mc";
mc.graphics.beginFill(0xFF3300, 100);
mc.graphics.drawRect(0, 0, 200, 200);
mc.graphics.endFill();

var child : Sprite = new Sprite();
child.name = "child";
child.graphics.beginFill(0x0000FF, 100);
child.graphics.drawRect(50, 50, 50, 50);
child.graphics.endFill();
mc.addChild(child);

child.addEventListener(MouseEvent3D.MOUSE_DOWN, handleBTNClick)
child.addEventListener(MouseEvent3D.MOUSE_OVER, handleBTNOver);
child.addEventListener(MouseEvent3D.MOUSE_OUT, handleBTNOut);
child.mouseEnabled = true;

return mc;
}

But the hand cursor doesn't show up. What am I missing? Is there any
example around? I was expecting an example of this very cool feature
in the lessons :P


Thanks guys, chr

Peter Kapelyan

unread,
Jan 24, 2008, 6:27:28 AM1/24/08
to away3...@googlegroups.com
I think you may be missing this:

child.useHandCursor=true;

It's off by default.
I've never tried it, hope it works!
Pete

On Jan 24, 2008 4:58 AM, gabon <nuthi...@googlemail.com> wrote:

Hi guys, I'm trying to have the same cursor effect on
http://www.airtightinteractive.com/projects/tiltviewer/app/ (in
papervision I couldn't), I tried:

var plane : Mesh = new Plane();
plane.material = new MovieMaterial(createContent(),
{interactive:true});

with

               private function createContent() : Sprite
               {
                       var mc : Sprite = new Sprite();
                        mc.name = "mc";
                       mc.graphics.beginFill(0xFF3300, 100);
                       mc.graphics.drawRect(0, 0, 200, 200);
                       mc.graphics.endFill();

                       var child : Sprite = new Sprite();
                       child.name = "child";
                       child.graphics.beginFill(0x0000FF, 100);
                       child.graphics.drawRect (50, 50, 50, 50);

                       child.graphics.endFill();
                       mc.addChild(child);

                       child.addEventListener(MouseEvent3D.MOUSE_DOWN, handleBTNClick)
                        child.addEventListener(MouseEvent3D.MOUSE_OVER, handleBTNOver);
                       child.addEventListener(MouseEvent3D.MOUSE_OUT, handleBTNOut);
                       child.mouseEnabled = true;

                       return mc;
               }

But the hand cursor doesn't show up. What am I missing? Is there any
example around? I was expecting an example of this very cool feature
in the lessons :P


Thanks guys, chr



--
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Makc

unread,
Jan 24, 2008, 6:42:50 AM1/24/08
to away3...@googlegroups.com
yeah but then you also need to enable child.buttonMode

Peter Kapelyan

unread,
Jan 24, 2008, 7:02:47 AM1/24/08
to away3...@googlegroups.com
Thanks :)
 
Makc got your back :)

gabon

unread,
Jan 24, 2008, 7:13:05 AM1/24/08
to away3d.dev
That's ace, thanks guys!


chr

On Jan 24, 11:42 am, Makc <makc.the.gr...@gmail.com> wrote:
> yeah but then you also need to enable child.buttonMode
>
> On 1/24/08, Peter Kapelyan <flashn...@gmail.com> wrote:
>
> > I think you may be missing this:
>
> > child.useHandCursor=true;
>
> > It's off by default.
> > I've never tried it, hope it works!
> > Pete
>
Reply all
Reply to author
Forward
0 new messages