What steps will reproduce the problem?
1.
create a class that extends org.papervision3d.objects.primitives.Cube (for
exemple cubeButton3D extends Cube)
2.
in cubeButton3D add an event listener on OBJECT_DOUBLE_CLICK like that:
addEventListener(InteractiveScene3DEvent.OBJECT_DOUBLE_CLICK,
onMouseDoubleClick);
3. create an other class that encapsulate cubeButton3D for exemple
that listen to the interactiveScene3DEvent and redispatch it
class button3DController extends EventDispatcher
{
private var m_cubebutton3D: cubeButton3D: null
private function foo():void
{
cubebutton3D.addEventListener
(
InteractiveScene3DEvent.OBJECT_DOUBLE_CLICK,
onMouseDoubleClick
);
}
private function foo(event:InteractiveScene3DEvent):void
{
//redispatch the event
dispatch(event);
}
}
What is the expected output? What do you see instead?
I expected to redispatch the InteractiveScene3DEvent, but the application
crash and the debugger claims a conversion error it can convert an event to
an interactiveScene3DEvent
What version of the product are you using? On what operating system?
rev 942
Please provide any additional information below.
The crash is quite normal, because the flash dispatch system try to clone
the event so it call the Event.clone(...) method because there is no clone
method in InteractiveScene3DEvent. I have written a clone method in
InteractiveScene3DEvent wich fix the trouble. You will find fix in
attachment, fill free to use it or not.
Original issue reported on code.google.com by damien.miras on 18 May 2010 at 10:41
Original issue reported on code.google.com by
damien.miras
on 18 May 2010 at 10:41Attachments: