[Papervision3D] InteractiveSceneManager update
John Grden
neoriley at gmail.com
Mon Jul 23 14:48:29 EDT 2007
Log updates:
Fixed stage positioning issue,
enabled Displayobject3D's to dispatch their own mouse events
added ObjectController.as for Component update
Now, InteractiveSceneManager dispatches the events through the
DisplayObject3D. So if you want to add a listener to the DO3D, you can
listen for InteractiveScene3DEvents:
Code from test FLA with the component:
import org.papervision3d.components.as3.flash9.PV3DColladaScene;
import org.papervision3d.events.*;
import org.papervision3d.scenes.InteractiveScene3D;
import org.papervision3d.objects.DisplayObject3D;
scene3d.debug = true;
scene3d.addEventListener(PV3DColladaScene.SCENE_COMPLETE, handleInit);
function handleInit(...rest):void
{
trace("init");
var sphere_1:DisplayObject3D = scene3d.collada.getChildByName
("sphere_1");
sphere_1.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,
handleObjectClick);
sphere_1.addEventListener(InteractiveScene3DEvent.OBJECT_OVER,
handleObjectOver);
sphere_1.addEventListener(InteractiveScene3DEvent.OBJECT_OUT,
handleObjectOut);
}
function handleObjectOut(e:InteractiveScene3DEvent):void
{
trace("out", e.displayObject3D.name);
}
function handleObjectOver(e:InteractiveScene3DEvent):void
{
trace("over", e.displayObject3D.name);
}
function handleObjectClick(e:InteractiveScene3DEvent):void
{
trace("click", e.displayObject3D.name);
}
--
[ JPG ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070723/350c576a/attachment.html
More information about the Papervision3D
mailing list