<div><font face="courier new,monospace">hey,</font></div>
<div><font face="courier new,monospace">adding interactivity in PV3D is the</font></div>
<div><font face="Courier New">same weather your using flash or flex.</font></div>
<div><font face="courier new,monospace"></font> </div>
<div><font face="courier new,monospace">i cant see all your code.</font></div>
<div><font face="courier new,monospace">but in the function that creates </font></div>
<div><font face="courier new,monospace">the actual planes add this code:</font></div>
<div><font face="courier new,monospace"></font> </div>
<div><font face="Courier New">[code]</font></div>
<div><font face="courier new,monospace"> function somthing():void {</font></div>
<div><font face="courier new,monospace"> var myPlane:Plane = new Plane(....);</font></div>
<div><font face="Courier New"> myPlane.material.interactive = true;</font></div>
<div><font face="courier new,monospace"> myPlane.addEventListener(InteractiveScene3DEvent.CLICK, hit);</font></div>
<div><font face="courier new,monospace"> }</font></div>
<div><font face="Courier New"></font> </div>
<div><font face="courier new,monospace"> function hit(e:InteractiveScene3DEvent):void {</font></div>
<div><font face="courier new,monospace"> Alert.show("This plane was clicked!");</font></div>
<div><font face="courier new,monospace"> }</font></div>
<div><font face="Courier New">[/code]</font></div>
<div><font face="Courier New"></font> </div>
<div><font face="courier new,monospace">hope that helps!<br clear="all">____ ___<br>\ \/ /___________ ____<br>.\ // __ \_ __ \/ _ \<br>./ \ ___/ | | \( <_> )<br>/___/\ \___ >__|---\____/<br>| \_/ \/ |<br>
| xero harrison |<br>| <a href="http://xero.nu">xero.nu</a>@<a href="http://gmail.com">gmail.com</a> |<br>| <a href="http://xero.nu">http://xero.nu</a> |<br>| <a href="http://fontvir.us">http://fontvir.us</a> |<br>
| <a href="http://hexarray.nu">http://hexarray.nu</a> | <br>| <a href="http://xero.owns.us">http://xero.owns.us</a> |<br>`---------------------' <br><br></font></div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">---------- Forwarded message ----------<br>From: j2me_soul <<a href="mailto:j2me_soul@163.com">j2me_soul@163.com</a>><br>
To: flexcoders <<a href="mailto:flexcoders@yahoogroups.com">flexcoders@yahoogroups.com</a>><br>Date: Wed, 6 May 2009 21:45:16 +0800 (CST)<br>Subject: [Papervision3D] Flex with PV3D. How to make a Plane in a canvas to accept the events?<br>
<div>Hi all,</div>
<div> </div>
<div>I put some planes in the viewport in a canvas.</div>
<div>But the planes can't accept any mouse-click event from canvas.</div>
<div>I set the viewport.interative = true, material of each plane = true, but it dosen't work.</div>
<div>What should I do now ?</div>
<div> </div>
<div>/* </div>
<div> * In the ReflectionWall class, for each Plane setting a function</div>
<div> * p = new Plane(ma,_imageWidth, _imageHeight, _seg, _seg);<br> * p.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, planeClickEvent);</div>
<div>*/</div>
<div> private var ref:ReflectionWall;</div>
<div> </div>
<div> private function init():void{</div>
<div> ref = new ReflectionWall("images/Belle.png",100, 100, 54, can.width, can.height);<br> can.rawChildren.addChild(ref);</div>
<div> ref.camera.zoom = 50;</div>
<div> addEventListener(Event.ENTER_FRAME, ref.render);<br> }</div>
<div> </div>
<div><mx:Canvas id="can" width="1000" height="750" /><br></div><br><br><span title="neteasefooter">
<hr>
<a href="http://512.mail.163.com/mailstamp/stamp/dz/activity.do" target="_blank">穿越地震带 纪念汶川地震一周年</a> </span><br></blockquote></div>