我制作了一个AR应用程序来检测打印的标记,并在上面播放视频。我想在纸上打印一个按钮,当它被手指挡住时,它会触发一个事件。
图像链接: http://tinypic.com/view.php?pic=23le2h2&s=7
应用程序开发是有一个AR测试,与简单的印刷纸和网络摄像头工作。通过隐藏标记触发按钮事件的最佳解决方案是什么?
操作系统: Windows
框架: FLARManager
发布于 2012-08-20 01:50:30
您只需要听一听什么时候和什么标记组合是活动的,并使if状态如下:
private function onEnterFrame (evt:Event) :void
{
if (this.activeMarker_1 && this.activeMarker_2)
{
trace("no button is being pressed");
}
else if (this.activeMarker_1 && this.activeMarker_2 == null)
{
trace("answer: no");
}
else if (this.activeMarker_1 == null && this.activeMarker_2)
{
trace("answer: yes");
}
else if (this.activeMarker_1 == null && this.activeMarker_2 == null)
{
trace("both buttons are being pressed");
}
}https://stackoverflow.com/questions/6640073
复制相似问题