A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [CS3] Blend Modes Alpha using Luminance

  1. #1
    Senior Member charlie_says's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    508

    [CS3] Blend Modes Alpha using Luminance

    Hi,
    I've been playing around with the blend modes, especially the alpha masking, and after a bit got it to work. (Easier, it turns out, to do it with code than in the timeline.)
    But...
    The alpha masking is based on the alpha of the mask (i.e. if you were using a gradient as a mask, it would go from full colour to transparent.)

    What I'd really like to be able to do is create an alpha mask based on the luminance of the content in the mask rather than the alpha - has anyone figured out a way of doing this.

    Charlie
    Last edited by charlie_says; 06-26-2008 at 10:09 AM.

  2. #2
    Senior Member charlie_says's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    508
    It did cross my mind that one solution to this might be to use getPixel to return the colour value of the mask content, and then to use that value to create a new Bitmap converting the summed RBG values into an alpha value.

    This, I think would work, but, it is complicated, and I'm really hoping there's a more straightforward way...

  3. #3
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    Have you tried combinations of MCs within MC in the mask layer?

    For example, a filter that removes saturation, then uses a Blend mode "Add" would basically be luminence based. Then add cacheAsBitmap and cross your fingers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center