Papervision3D во Flex выдает ошибку при нажатии 3D-объекта
Я работаю над игрой, в которой есть несколько объектов Plane, на которые игрок может щелкнуть. Мой основной класс приложения расширяет класс 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 ответ
Решение
Рядом с org\papervision3d\core\utils\InteractiveSceneManager.as:189 был оператор if, который я должен был прокомментировать, и затем он начал работать.