How to call/use a function inside an object? Javascript : I want to call a function or even create one in an object map-area. How does it properly work ? This is what I got. Doesn't work though...

   

 

    var _images = {
           test: {
           path:'test.jpg',
            areas: [{
                     coords:'211,38,238,60',
        		text: 'let me test it',
        		//onclick: .... ?
                        obj = function(){
              this.hello = function hello (){
                  }
        		  alert("Hello");
                  }
       
        	  }
            ]
          },
        }
        var asdf = new obj();
        asdf.cancel();

