Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 如何在Flash中找到导致空对象引用的对象?_Actionscript 3_Flash Cs5 - Fatal编程技术网

Actionscript 3 如何在Flash中找到导致空对象引用的对象?

Actionscript 3 如何在Flash中找到导致空对象引用的对象?,actionscript-3,flash-cs5,Actionscript 3,Flash Cs5,我的flash应用程序中有此错误,但找不到错误源?是否可以使用flash调试器找到导致此错误的对象 TypeError: Error #1009: Cannot access a property or method of a null object reference. at Reading2mergedlayers_fla::MainTimeline/hideTimer2() at Reading2mergedlayers_fla::MainTimeline/fram

我的flash应用程序中有此错误,但找不到错误源?是否可以使用flash调试器找到导致此错误的对象

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Reading2mergedlayers_fla::MainTimeline/hideTimer2()
    at Reading2mergedlayers_fla::MainTimeline/frame37()
    at flash.display::MovieClip/prevFrame()
    at Reading2mergedlayers_fla::MainTimeline/back32()

从FlashBuilder运行代码(将您的源代码连接到某种类型的项目中——哪种类型取决于您所拥有的)。调试器应在出现错误的行停止,您可以看到哪个变量为null。

如果允许在flash设置中进行调试,flash将在控制台中打印错误发生的行号。这使得找出哪个对象导致问题变得更加容易。您可以通过执行以下步骤来启用此功能:

打开FLA文件后,选择文件>发布设置

在“发布设置”对话框中,单击闪存选项卡(CS5)或闪存 类别(CS5.5)

选择“允许调试”

了解更多信息