property pM1, pM2, pM3, pM4, pM5, pM6, pM7, pM8, pM9 -- matrix values property pBias, pDivisor property pR, pG, pB property pAlpha, pClamp, pUseAlpha -- -- Drop onto a sprite for a Convolution Matrix visual effect on rollover. -- Sprite must have 32-bit color for the effect to display. -- Works only with Director 11.5 or newer. -- Ken Loge - http://diginoodles.com -- on getPropertyDescriptionList me list = [:] addProp list, #pM1, [#comment: "Matrix Value 1:", #format: #integer, #default: -2] addProp list, #pM2, [#comment: "Matrix Value 2:", #format: #integer, #default: -1] addProp list, #pM3, [#comment: "Matrix Value 3:", #format: #integer, #default: 0] addProp list, #pM4, [#comment: "Matrix Value 4:", #format: #integer, #default: -1] addProp list, #pM5, [#comment: "Matrix Value 5:", #format: #integer, #default: 1] addProp list, #pM6, [#comment: "Matrix Value 6:", #format: #integer, #default: 1] addProp list, #pM7, [#comment: "Matrix Value 7:", #format: #integer, #default: 0] addProp list, #pM8, [#comment: "Matrix Value 8:", #format: #integer, #default: 1] addProp list, #pM9, [#comment: "Matrix Value 9:", #format: #integer, #default: 2] addProp list, #pBias, [#comment: "Bias Value:", #format: #integer, #default: 0, #range: [#min: -127, #max: 127]] addProp list, #pDivisor, [#comment: "Divisor Value:", #format: #integer, #default: 1, #range: [#min: 1, #max: 255]] addProp list, #pR, [#comment: "Red Color Value:", #format: #integer, #default: 0, #range: [#min: 0, #max: 255]] addProp list, #pG, [#comment: "Green Color Value:", #format: #integer, #default: 0, #range: [#min: 0, #max: 255]] addProp list, #pB, [#comment: "Blue Color Value:", #format: #integer, #default: 0, #range: [#min: 0, #max: 255]] addProp list, #pAlpha, [#comment: "Alpha Transparency Value:", #format: #integer, #default: 0, #range: [#min: 0, #max: 255]] addProp list, #pClamp, [#comment: "Clamp Image:", #format: #boolean, #default: 1] addProp list, #pUseAlpha, [#comment: "Preserve Alpha:", #format: #boolean, #default: 1] return list end on mouseEnter me -- add VFX filter theList = [pM1, pM2, pM3, pM4, pM5, pM6, pM7, pM8, pM9] theMatrix = newMatrix(3, 3, theList) myFilter = filter(#ConvolutionMatrixFilter, [#matrix: theMatrix, #bias:pBias, #divisor: pDivisor, #color:rgb(pR,pG,pB), #alpha:pAlpha, #clamp:pClamp, #preserveAlpha:pUseAlpha]) sprite(me.spriteNum).filterlist.append(myFilter) end on mouseLeave me -- clear VFX filter sprite(me.spriteNum).filterlist.deleteAll() end