4 Replies Latest reply on Apr 8, 2008 10:38 PM by Rothrock

    AS drop shadow

    brian914 Level 1
      I created a drop shadow in my movie via AS, but don't understand how to adjust its thickness, alpha, etc.
      Here is what I have so far:

      import flash.filters.DropShadowFilter;
      var dropShadow:DropShadowFilter = new DropShadowFilter();
      var filtersArray:Array = new Array(dropShadow);
      myImage.filters = filtersArray;

      How do I adjust the strenght of the filter?

      Thanks a lot for any help!
        • 1. Re: AS drop shadow
          Rothrock Level 5
          You check out DropShadowFilter in the help files. There it tells you all the arguments that you can put in the constructor (or change later) that do these things for you. So to get you started.

          var dropShadow:DropShadowFilter=new DropShadowFilter(10,135)

          Will make a shadow 10 pixels away and at 135 degrees. The defaults (which are also explained in the help file) are 4 pixels and 45 degrees. There are 11 different properties you can play with. After you check those out post back if you are having troubles with any specific part of it.
          • 2. Re: AS drop shadow
            brian914 Level 1
            Thank you Rothrock!
            I looked it up and got it to do what I want it. If I leave out parameters, does that make it less processor intensive, or does that not make much of a difference?

            Thanks a lot!

            • 3. Re: AS drop shadow
              Rothrock Level 5
              Well you will notice that they all have defaults, so if you leave them out it won't make a difference because they are set by Flash.

              And if you want to change the 8th one, you will need to put at least 8 arguments in the constructor otherwise Flash won't know that it is the 8th one you want to change!

              If you read through some more of the entries you will find that blurX and blurY values which are powers of two will render faster than values that aren't. And that higher values for quality will also slow it down as well.

              So those two things are were you will get to control the hit as it were.
              • 4. Re: AS drop shadow
                Rothrock Level 5
                Strange this hung up, but the post is here, but it doesn't count in the totals.