1 Reply Latest reply on May 28, 2007 12:26 AM by Greg Dove

    How do I get what does the function does.


      I want to get what the function actually does like in javascript: object.onmouseout
      what has hot a result of this:
      function anonymus() {
      what ever the function does
      but in flash I tried to use this: object.onEnterFrame
      but I get this
      [type Function]

        • 1. Re: How do I get what does the function does.
          Greg Dove Level 4
          I'm not sure I understand...but then I'm not entirely familiar with javascript... do you mean that you want to access the actionscript definition of the function? You can't do that (except maybe with a decompiler).

          to call a function and get the result you use the open and close braces, with arguments if required (for example):

          object.doMyThing("with this argument")

          or just

          depending on where its defined and current scope.

          but if you do trace(doMyThing) or trace(object.doMyThing)
          it will trace: [type Function]

          this is normal. In the same way that an object's string output is [object Object] if you try to trace it. The difference with an object is that you can access its properties and method names (functions) without knowing them if they are not hidden by using a for in loop. But you can't (AFAIK) get anything related to the contents/definition of a function (or method) at runtime.