3 Replies Latest reply on Oct 18, 2006 1:30 PM by Neotropic

    asfunction in text area component

    Ian.S
      Does anyone know if asfunction can be used in the text area comonent?

      I have always use it successfully in text field components, but i have found that for some reason it doesn't work in a text area.
        • 1. asfunction in text area component
          Juankpro Level 2
          This is because asfunction calls a function inside the movieclip containing the textfield area, and the TextArea component has a TextField which is placed inside the TextArea component which is a MovieClip Itself. So the link does not find the function there

          To make it work, place the function as a method of the component like this:

          myTextArea.functName = function(){
          //Place your code here
          };

          MyTextArea is the instance name of your component and functName is the name of the function called by asfunction
          • 2. Re: asfunction in text area component
            Ian.S Level 1
            Thanks

            I should have realised, I have now made all the as functions refer to _root as that is where the functions are.
            • 3. Re: asfunction in text area component
              Neotropic
              _global.functname= function(param) {
              // code here:
              };

              <a href="asfunction:functname,value1,value2">LINK</a>

              Eliminates needing to add _root. and _parent. to function calls.