Jump to content
Search Community

MotionBlur in Flex 4

TripleToe test
Moderator Tag

Recommended Posts

I 'm trying to use the MotionBlur plugin in a Flex 4 application. The component that I'm trying to apply the motionblur to is a SkinnableComponent which is parented by a Group. When I run the motionBlur, I get this error:

 

Error: addChildAt() is not available in this class. Instead, use addElementAt() or modify the skin, if you have one.
at spark.components::Group/addChildAt()[E]
at com.greensock.plugins::MotionBlurPlugin/set changeFactor()[/src/com/greensock/plugins/MotionBlurPlugin.as]
at com.greensock::TweenMax/renderTime()[/src/com/greensock/TweenMax.as]
at com.greensock::TimelineMax/renderTime()[/src/com/greensock/TimelineMax.as]
at com.greensock.core::SimpleTimeline/renderTime()[/src/com/greensock/core/SimpleTimeline.as]
at com.greensock::TweenLite$/updateAll()[/src/com/greensock/TweenLite.as]

 

This is obviously because the motionBlur plugin is working with Sprites and Display objects and it seems to be conflicting with the way that Flex 4 handles the parenting of items in the displaylist (ie using addElement rather than addChild). Is there a way around this? Will motionBlur be updated to work with Flex 4?

Link to comment
Share on other sites

Ah, the joys of working with Flex. Sorry, I just find it incredibly cumbersome and annoying. Adobe decided to switch things up yet again in Flex 4 by imposing an addElement() instead of addChild(). I'm on a family vacation at the moment but when I return next week I'll add more conditional logic in MotionBlurPlugin to accommodate the new Flex 4 API. In the mean time, feel free to make the necessary change to the plugin yourself if you prefer. Thanks for your patience.

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.
×
×
  • Create New...