Papervision 3D: mostrare il cursor hand sugli elementi 3D interattivi

domenica 15 marzo, 2009

Impostato un materiale in modalità interactive e agganciando un evento ad un piano:

Actionscript:
  1. var mymaterial:BitmapAssetMaterial = new BitmapAssetMaterial("foto1");
  2. mymaterial.interactive             = true;
  3. var myplane:Plane                  = new Plane( my_material, 200, 100, 0, 0);
  4. myplane.addEventListener( InteractiveScene3DEvent.OBJECT_PRESS,
  5.     function(e:InteractiveScene3DEvent):void {
  6.     // todo
  7.     }
  8. );

è possibile attivare la visualizzazione della "manina" agendo sulla BasicView che lo contiene e lo "renderizza", e non sui singoli elementi tridimensianali:

Actionscript:
  1. var bv:BasicView = new BasicView(stage.stageWidth, stage.stageHeight, false, true);
  2. bv.buttonMode    = true;
  3. bv.useHandCursor = true;

Post correlati

Questo articolo ti è stato utile?: Per nientePocoAbbastanzaMoltoMoltissimo
Loading ... Loading ...

Non ci sono commenti per questo Post

Lascia un commento

TAG XHTML PERMESSI: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> INSERIMENTO CODICE:
<pre></pre>         // blocco generico
[code][/code]       // blocco generico
[as][/as]           // Actionscript
[css][/css]         // CSS Style Sheet
[html][/html]       // HTML
[js][/js]           // Javascript
[objc][/objc]       // Objective-C
[php][/php]         // PHP
[sql][/sql]         // SQL