2 Replies Latest reply on Aug 25, 2006 5:20 PM by paulpsd7

    Trimming the end off a string

    paulpsd7
      There may be a different way to do this.

      I have a button nested in an MC. When the button is clicked, I want to store the path to that MC.

      I've tried this:
      targetpath (this)

      However, that gives the path to the button, not the MC. In other words, it gives the MC path and adds ".this_button" to the end. In order to save the path to the MC, I need to remove those characters from the string. How can I trim off the last characters in a string when I don't know the total number of characters in the string? Is it possible to trim off the end?

      Alternately, is there a way I can get the path to the MC without getting the path to the button? I've tried this:
      targetpath (_parent)

      That gives me the path to the MC in which the MC I'm interested in is nested.