0 Replies Latest reply on Dec 28, 2008 10:37 AM by chopTheWood

    Trying to use .Selection

      this is an old problem still yet unsolved:

      I have a main movie "A" with a clip loaded into a movieclip called "B_mc"

      B is trying to use the Selection method on a text field "my_text" located on "A"

      ...I select some text in "my_text" (on the root movie) then click on "format_mc" which is a mc on "B" that calls a function on frame 1 of "B"

      //Here is part of the code that is in frame 1 of "B" :
      this._lockroot = true; //
      var char1:Number = Selection.getBeginIndex();//first character index of selected text
      var charLast:Number = Selection.getEndIndex();//first character index of selected text
      var selectionLength:Number = charLast-char1;

      //char1 and charLast are always -1, that is they are not part of the selection

      I've been messing with this for a month now.. any ideas?