DragManager将Flash应用程序加载到Flash应用程序时出现问题
问题描述:
我有一个使用DragManager的Flex应用程序。 当我加载该应用到闪存应用 并尝试使用拖放功能 - 我得到一个错误:DragManager将Flash应用程序加载到Flash应用程序时出现问题
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::CursorManagerImpl/showCurrentCursor()
at mx.managers::CursorManagerImpl/setCursor()
at mx.managers.dragClasses::DragProxy/showFeedback()
at mx.managers.dragClasses::DragProxy/mouseMoveHandler()
但是,当我只需运行一个Flex应用程序(不装载仪成一个闪一下)一切正常。
答
简要看一下该方法CursorManagerImpl/showCurrentCursor()
表明它访问很多Flex特有的属性,如systemManager.stage
,systemManager.document
,Application.application
等等。因为你加载一个Flex应用程序放入Flash动画中,可能会出现一些特有的柔性,这些的参数未正确初始化。