6 Replies Latest reply on Jul 29, 2008 1:55 AM by (Roman_Vernik)

    Get parent of undefined  is it possible?

      My script is resizing object when the context is "Text" i.e. there is some insertion point. I use this code to get object to resize:

      if (selection[0].constructor.name = "InsertionPoint")
      objectToResize = selection[0].parentTextFrames[0];

      It works good until cursor is visible. But when object becomes small enough cursor goes out of visible area and "selection[0]" is undefined. How can I get access to the object in this case?