DisplayObject3D.buttonMode
Papervision3DのDisplayObject3DにはbuttonModeがないけど、実装するとしたらこんな感じなのかなー。左の青いのがbuttonModeをtrueにしたPlaneで、右の赤いのがbuttonModeをfalseにしたPlane。
viewport.containerSprite.buttonMode = true;ってしちゃうと、Scene3Dにaddした全てのオブジェクト上でボタンカーソルになっちゃうから、下のサンプルみたいにオブジェクト毎にbuttonModeを切り替えられないし・・・
ただ、このサンプルみたくオブジェクトが動いてる時にマウスアウトイベントが取れないことがある。Planeがカメラに平行なときにPlaneの端にマウスオーバーしてマウスを止めておいて回転で勝手にマウスアウトになるタイミングとか。こいつを避けるためにはもう一工夫いりそう。
About this entry
You’re currently reading “DisplayObject3D.buttonMode,” an entry on jp.ferv.blog
- Published:
- Wed, Nov 11th, 2009 at 4:46 AM
- Author:
- dsk
- Category:
- Web
- Tags:
- ActionScript 3.0, Papervision3D
No comments
Jump to comment form | comments rss | trackback uri