1

我制作了一个 AR 应用程序,可以检测打印的标记并在其上播放视频。我想在纸上打印一个按钮,当它被手指挡住时会触发一个事件。

图片链接: http ://tinypic.com/view.php?pic=23le2h2&s=7

应用程序开发是有一个仅适用于简单打印纸和网络摄像头的 AR 测验。通过隐藏标记触发按钮事件的最佳解决方案是什么?

操作系统: Windows PC

框架: FLARManager

4

1 回答 1

0

你只需要听什么时候和什么组合的标记是活跃的,如果陈述如下:

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");
  }
}
于 2012-08-20T01:50:30.000 回答