2 Replies Latest reply on Nov 8, 2010 4:34 AM by erainirene

    How can I name a button/movie so that an external script can read it?

    erainirene

      Hi,

       

      I have a javascript on my website that is called on any click. The script reads the name of the clicked item. This works fine for all jpg/gif images with a name, but how can I name a flash movie in such a way that this script can read it? I tried several things, the name (and id) in the published parameters, the name of the instance, of the button, etc. But nothing works?

       

      The external javascript is this:

       

      var theName;

      function grabName(e){

      var targ;

      if (!e) var e = window.event;

      if (e.target) targ = e.target;

      else if (e.srcElement) targ = e.srcElement;

      if (targ.nodeType == 3) {targ = targ.parentNode;}

      theName=targ.name;

      if(theName){GoogleCounter(theName);}

      }

      document.onclick=grabName;

       

      Thanks,

      Irene