1 Reply Latest reply on Jun 6, 2006 2:53 AM by James Newton, ACP

    Call function in moviescript

    *peter
      Hi,

      I have multiple functions in my moviescript, i want to call on them without having to create a script like this:

      on mouseWithin me
      moveLeft(pNum)
      end

      I have functions like moveLeft, moveRight, moveUp, moveDown etc. How can i use one script who will change the called on function? For pNum i use:

      on getPropertyDescriptionList me
      pList = [:]
      pList.addProp(#pNum, [#format: #integer, #default: 1, #comment: "enter number"])
      return pList
      end

      But this won't work for the choice of function.

      Who can help?
        • 1. Re: Call function in moviescript
          James Newton, ACP Level 3
          Can you put this question into context? What are you trying to achieve?

          It sounds as if you are looking for something like this...

          property command


          on mouseUp(me)
          do command
          end mouseUp


          on getPropertyDescriptionList(me)
          vPropertyList = [:]

          vPropertyList[ \
          #command] = [ \
          #comment: "Command (may cause a script error)", \
          #format: #string, \
          #default: "alert "&QUOTE&"command executed"&QUOTE]

          return vPropertyList
          end getPropertyDescriptionList


          ... but I am not sure why you should want to work that way.