Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
doodledude

error: colourmatrixfilter and glowfilter on same object

Recommended Posts

Hi Jack,
 
I'm getting an intermittent error when applying colourmatrixfilter and glowfilter on same object.
if the error happens i can "dismiss" in flash[debug]player but the effect will never apply.

if I then close flashplayer and re-run often it works fine (not making any change in code)

 

any ideas?
 
 
heres the error message
-----
TypeError: Error #1034: Type Coercion failed: cannot convert flash.filters::GlowFilter@1084d72e1 to flash.filters.ColorMatrixFilter.
    at com.greensock.plugins::ColorMatrixFilterPlugin/_onInitTween()[/Active/_Flash/_AS3_v12/src/com/greensock/plugins/ColorMatrixFilterPlugin.as:94]
    at com.greensock::TweenLite/_initProps()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenLite.as:587]
    at com.greensock::TweenLite/_init()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenLite.as:545]
    at com.greensock::TweenMax/render()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenMax.as:965]
    at com.greensock.core::SimpleTimeline/render()[/Active/_Flash/_AS3_v12/src/com/greensock/core/SimpleTimeline.as:166]
    at com.greensock.core::Animation$/_updateRoot()[/Active/_Flash/_AS3_v12/src/com/greensock/core/Animation.as:546]
-----
 
heres the code:

var mainTint:int = 0x99cc00;//green
var innerGlow:int = 0xacd100;
var outerGlow:int = 0xffffcc;
var bm:Bitmap = Bitmap(_gameGrid.purpleCardBitmaps[_dragCard.index]);
TweenMax.to(bm, 0.3, {
		colorMatrixFilter:{colorize:mainTint, amount:1, contrast:1, brightness:1.4, saturation:1, hue:0, index:0},
		glowFilter:{color:innerGlow, inner:true, alpha:0.8, blurX:40, blurY:40, index:1}
	});
TweenMax.to(bm, 0.3, {
		overwrite:false,
		glowFilter:{color:outerGlow, inner:false, alpha:0.6, blurX:15, blurY:15, index:2}
	});
Link to comment
Share on other sites

Please try the latest FilterPlugin (attached). Drop that into your com/greensock/plugins directory and republish. You may need to clear your ASO files too. 

FilterPlugin.as.zip

Link to comment
Share on other sites

thanks for your speedy reply.

 

found the problem (I think).

I've no doubt you are correct that the issue was in filterplugin.as, however you should check the swc.

 

I am using the latest version (just downloaded again to be absolutly sure - 12.0.10)

when I complile against the com folder verison there is no error and all works as expected.

when I complile using the swc the error still happens, so presumably the updated filterplugin.as is not correctly embeded into it.

 

thanks again

Link to comment
Share on other sites

I think what's happened here is that Jack has just uploaded a hotfix in his post for you to test in your project. If it does fix your issue (and doesn't cause any others :lol:) it will probably be merged into the next official GSAP update.

Link to comment
Share on other sites

to avoid any doubt, it does fix the issue. cheers :-D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×