3 Replies Latest reply on Jan 6, 2013 8:35 AM by Harbs.

    How to Set an Object's Color Without Creating a Color or Swatch Object

    mlavie Level 1

      (CS5, Actionscript)

       

      Hi All,

       

      I have hundreds of Text objects whose fillColor I wish to determine on the fly when my Extension processes the document.

       

      The problem is that Text.fillColor insists on having a Color or Swatch object assigned to it. The compoiler refuses to allow assigning an CMYK, like:

      myText.fillColor = [c, m, y, k]

       

      The issue is that I all the new Color and Swatch objects clog up the COlor dropdown in the InDesign UI and never go away, and more importantnly consume memory.

       

      Is there any way to directly assign CMYK values to a Text.fillCOlor without contructing superfluous COlor or Swatch objects?

       

      TIA,

      mlavie