A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: KM 8.1 Chroma key filter [AS3, FP10]

  1. #1
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632

    KM 8.1 Chroma key filter [AS3, FP10]

    KM 8.1 has a new filter you can use for chroma keying.

    KeyFilter(keyColor, chromaTolerance, lumaTolerance, toleranceRange, preBlur, invertMask)

    keyColor is a color value
    chromaTolerance, lumaTolerance and toleranceRange are numbers from 0.0 to 1.0
    preBlur and invertMask are boolean values

    The filter works just like other filters.
    You can use it from the gui or from ActionScript.
    An actionscript example :

    code:
    import km.filters.*;

    var f:KeyFilter = new KeyFilter(0x00ff00, 0.4, 1.0);
    mc1.filters = [f];



    The filter compares the chroma and luma components of the key color you supply with the chroma and luma components of each pixel of the object the filter is applied to and makes the pixel transparent if the differences between the components are within the specified tolerances.

    If you specify a toleranceRange of 0 (or omit it), the pixels become either transparent or stay the same. If you specify a bigger value, the transparency will change gradually within the specified range.

    With the preBlur parameter set to true, the filter slightly blurs the object before the chroma and luma components are compared. The result will not be blurred but the edges will become a little softer.
    Most of the times setting it to true looks best but it does result in a higher cpu load compared to setting it to false.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Here's an example (requires FP 10.1) to experiment with different values for the filter.
    Click outside of one of the components on stage to select your own image.
    http://www.waterlijn.info/km/as3/Chr...viewImage.html

  3. #3
    Registered User
    Join Date
    May 2013
    Posts
    1
    hi,

    Could you please tell me how to get KM 8.1 Chroma key filter

    thanks

  4. #4
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,512
    I responded to your email. The chroma filter is part of the GUI_VideoObject class. You can see the code in Program Files / KoolMoves / Bin / AS3 / Classes / km / components / GUI_VideoObject.as. The documentation is at Bin / AS3 / Documentation.

  5. #5
    Junior Member
    Join Date
    Oct 2017
    Location
    Brazil, São Paulo
    Posts
    1
    Hello Bob, Could you show me how to get de KM Chroma Key Filter?

    Thank you.

  6. #6
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,512
    See this tutorial -- http://www.koolmoves.com/chroma-key-filter.html

    You have to be in Flash export Advanced or Cartooning gui mode.
    Use File > Import to import a flash video. Use Effects > Flash 10 Filters > ChromaKey to apply the filter to the video.

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