每次我尝试运行我的ActionScript 3程序时,都会收到此错误:
1151:内部命名空间中定义mcPlayer存在冲突。
这是我的剧本:
package
{
import flash.display.MovieClip;
public class Knight extends MovieClip
{
var mcPlayer:MovieClip;
public function Knight()
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown)
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp)
}
private function keyUp(e:KeyboardEvent):void
{
trace(e.keyCode)
}
private function keyDown(e:KeyboardEvent):void
{
}
}
}
我该如何解决?