Flex中的Papervision3D在单击3D对象时会引发错误

时间:2011-08-25 10:52:35

标签: flex flex4.5 papervision3d

我正在制作一个游戏,其中有几个玩家可以点击的平面物体。我的主应用程序类扩展了BasicView类。我将整个游戏作为一个ActionScript项目进行制作,当我将其作为一个游戏运行时,一切正常。

现在我在Flex应用程序中加载此游戏。当添加到Flex应用程序时,它会完美运行,直到我点击某处,它会抛出以下错误:

undefined
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/handleUpdate()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:724]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/handleUpdate()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:724]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/handleUpdate()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:724]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/handleUpdate()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:724]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/handleUpdate()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:724]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/update()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:562]
    at org.papervision3d.core.utils.virtualmouse::VirtualMouse/press()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\virtualmouse\VirtualMouse.as:451]
    at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress()[D:\Omer Hassan\our5pillars\repository\flash\game\src\org\papervision3d\core\utils\InteractiveSceneManager.as:189]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]
    at flash.events::EventDispatcher/dispatchEventFunction()

有关如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:0)

在org \ papervision3d \ core \ utils \ InteractiveSceneManager.as:189附近有一个if语句,我必须发表评论然后才开始工作。