Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.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 操作脚本3中的hitTestpoint给定错误_Actionscript 3_Flash_Compile Time Constant - Fatal编程技术网

Actionscript 3 操作脚本3中的hitTestpoint给定错误

Actionscript 3 操作脚本3中的hitTestpoint给定错误,actionscript-3,flash,compile-time-constant,Actionscript 3,Flash,Compile Time Constant,我正在努力让hitTestPoint发挥作用。当我键入此项时,会出现以下错误: 场景1 1046:找不到类型或类型不是编译时常量:mcircle 以下是我的代码: import flash.events.Event; addEventListener(Event.ENTER_FRAME, hitTest); function hitTest(evt:Event){ if(mcircle.hitTestPoint(mouseX, mouseY, true)){ hitT

我正在努力让hitTestPoint发挥作用。当我键入此项时,会出现以下错误:

场景1 1046:找不到类型或类型不是编译时常量:mcircle

以下是我的代码:

    import flash.events.Event;

    addEventListener(Event.ENTER_FRAME, hitTest);

function hitTest(evt:Event){
if(mcircle.hitTestPoint(mouseX, mouseY, true)){
    hitText1.text= "hitTestPoint- TRUE";
}
else{
    hitText1.text= "hitTestPoint-FALSE";
}
}


我是个新手,所以我知道我犯了一些愚蠢的错误。任何帮助都将不胜感激:)

请确保mcircle的实例名与代码完全匹配

在flash IDE中,单击舞台上的圆圈,以选择剪辑。然后查看“属性”面板并验证片段的实例名称

如果不确定“属性”面板的位置,可以使用屏幕顶部的菜单,通过选择“窗口/属性”来查找它


在库中看到的名称是符号的名称。它不是实例名称。

您确定吗?在舞台上选择该对象时,请转到“属性”面板,确保其完全相同。它区分大小写。你确定那不是麦可圈吗?还是麦克尔?我确信有一张图片显示了它的样子^ Prototypic是指对象属性下剪辑的实例名称,而不是库中的名称。在屏幕截图中,选择舞台上的电影剪辑,然后单击“库”选项卡旁边的“属性”选项卡。始终使用大写字母命名链接和类,不要将类名用作实例名称。经常导致问题。