3 Replies Latest reply on Oct 4, 2012 7:28 AM by manuscapo

    Converting all TLF text fields to Classic text fields

    orgicus Level 1

      Hi,

       

      I need to convert ALL the TLF text fields in a flash document and would like to automate this tedious task.

      Unfortunately there is no API for the TLF text

      If I print the properties of a TLF text field in JSFL I get this:

       

      elementType:tlfText
      name:
      left:109
      top:113
      width:234.95
      height:154
      locked:false
      matrix:[object Object]
      depth:1
      layer:[object Layer]
      selected:true
      x:109
      y:113
      transformX:226.45
      transformY:190
      scaleX:1
      scaleY:1
      skewX:0
      skewY:0
      rotation:0
      transformationPoint:[object Object]
      objectSpaceBounds:[object Object]
      duration:0
      framerate:0
      
      

      which to me looks like the Element instance with tlfText set as the elementType.

       

      If I convert a TLF field to a Classic field in the IDE, the History Panel doesn't help.

      I imagine one way would be to :

      1. create a new Classic field
      2. set the same bounds as the TLF field
      3. copy the text and text properties
      4. remove the TLF field

       

      The first two steps are easy, but what can I do about step 3 ?

      Please say there are some undocumented functions available to do this !

       

      On another note, importing text from Illustrator always defaults to TLF in CS5/CS5.5

      I wish there was a choice, maybe in the AI File Importer settings.