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

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

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

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

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

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
					[cc_actionscript][/cc_actionscript] // Actionscript
					[cc_actionscript3][/cc_actionscript3] // Actionscript 3
					[cc_css][/cc_css] // CSS Style Sheet
					[cc_html][/cc_html] // HTML
					[cc_js][/cc_js] // Javascript
					[cc_objc][/cc_objc] // Objective-C
					[cc_php][/cc_objc] // PHP
					[cc_sql][/cc_sql] // SQL


Stop SOPA