1

I made an AR Application that detects the printed marker & plays the video on it. I'd like to have a button printed on paper, which triggers an event when its blocked by a finger.

IMAGE LINK: http://tinypic.com/view.php?pic=23le2h2&s=7

The application development is to have an AR Quiz that works with simple printed paper & Webcam only. What is the best solution to have the button event triggered by hiding the marker?

Operating System: Windows PC

Framework: FLARManager

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
Chen
  • 11
  • 1

1 Answers1

0

You just need to listen when and what combination of markers is active and make if statments like:

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");
  }
}
Joao Belchior
  • 25
  • 1
  • 6