Start a new topic

onEnterFieldOfVision event

onEnterFieldOfVision event
1 Comment


Hello guys, can anyone tell me what type is the onEnterFieldOfVison "event" variable that is uses in the Trackable2DObject? why can't i compare it to another string variable like this case? i tried many times but nothing works please help i'm stuck
var pageOne = new AR.Trackable2DObject(this.tracker, "*", {
            drawables: {
                cam: overlayOne
            },
            onEnterFieldOfVision : function(event) {                    
               ........
                for (var i=0;i<=9;i++){
                     for (var j=0;j<=1;j++){
                         
                         a=JSON.stringify(data.results.operations.created.productLangs.name);
                         alert("name="+a);
                        if(event==a){ //the problem is here he doesn't compare it to "a" although both of them are string (as i know) ;)
                        alert("yes");
                       
                          }
                        }
                    }
        });
                }

                
        });
Login or Signup to post a comment