2011-07-10 70 views
1

我做了一個AR應用程序,檢測打印標記&播放視頻。 我想在紙上打印一個按鈕,當它被手指擋住時觸發事件。AR帶打印按鈕

圖像鏈接:http://tinypic.com/view.php?pic=23le2h2&s=7

的應用開發是有一個AR測驗,與簡單的打印紙僅&網絡攝像頭的工作原理。隱藏標記觸發按鈕事件的最佳解決方案是什麼?

操作系統:的Windows PC

框架: FLARManager

回答

0

你只需要聽的時候,什麼標記的組合是活動的,如果做喜歡statments:

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"); 
    } 
}