5 Replies Latest reply on May 6, 2015 1:02 AM by anhttps://itunnew58432811

    how to programmatically bind actions to elements

    mads18950258 Level 1

      hi

       

      how do i programmatically add/bind a new event to an element after executing another click event ?.

      currently i have a popup feature which should closes again if the user clicks anywhere on the screen/window, i tried adding the close event to the stage from the beginning, but naturally it's called at the same time my open button is called, so now i need to bind a click action to the stage after clicking x button... how is this done the most efficient way ?.

       

      note:

      i did try using bind, but without luck.

      ......bind ("click",function(){alert("Hello!");});

       

      any suggestions ?