4 Replies Latest reply on Jul 26, 2010 10:43 PM by rottenuncle

    [AS CS5] Add a drop shadow to text frame

    rottenuncle

      Trying to rewrite a pile of scripts written for either 2.0 or CS2. I thought I had figured out the drop shadows, but this does not seem to be working:

       

      set myMonthBox to make text frame with properties {geometric bounds:{"52p2", "3p", "56p11", "63p"}, contents:ThisMonth & tab & thisyear), fill color:swatch "None" of myDocument, fill tint:100, stroke color:swatch "None" of myDocument}

      tell myMonthBox

      tell drop shadow settings of fill transparency settings

      set mode to drop

      set blend mode to multiply

      set x offset to "0p3"

      set y offset to "0p3"

      set size to "0p3"

      set effect color to swatch "Black" of myDocument

      set opacity to 75

      end tell

      end tell

      No error messages, but also no shadow. Anyone have a suggestion?

        • 1. Re: [AS CS5] Add a drop shadow to text frame
          sstanleyau Level 4

          Try using a variable for the swatch; using the name like that can cause confusion because you're saying "of myDocument" inside a "tell myMonthBox" block. Use something like:

           

          set myBlack to swatch "Black" of document 1

          [...]

          set effect color to myBlack


          • 2. Re: [AS CS5] Add a drop shadow to text frame
            rottenuncle Level 1

            Thanks, Shane, but that wasn't it. Tried it but got same result. Looking at the event log, it seems to be applying everything correctly, but the end result has no shadow. Here is the event log:

             

            set mode of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to drop

            set blend mode of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to multiply

            set x offset of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to "0p3"

            set y offset of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to "0p3"

            set size of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to "0p3"

            set effect color of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to color id 8 of document id 4

            set opacity of drop shadow settings of fill transparency settings of text frame id 16239 of spread id 11654 of document id 4 to 75


            • 3. Re: [AS CS5] Add a drop shadow to text frame
              sstanleyau Level 4

              Try giving the frame a fill color other than None -- you're getting a shadow of nothing at the moment.

              1 person found this helpful
              • 4. Re: [AS CS5] Add a drop shadow to text frame
                rottenuncle Level 1

                Ah, now I see. I should have used content transparency settings, not fill transparency settings, to get a drop shadow on the text. Didn't realize that CS5 applies shadow effects independently to object, fill, content, etc.