Jump to content


Turn off MotionBlur with one flag?

Moderator Tag

Recommended Posts

Is there a way to turn a plugin like motion blur on/off at runtime without resorting to this kind of bloat?


if (OptimizationLevel < 1) {
			TweenMax.to(FSPanel1_mc, 0.9, { x:203, delay:0.5, motionBlur: { strength:0.4, quality:1 }, ease:Bounce.easeOut });
			TweenMax.to(FSPanel2_mc, 0.9, { x:400, delay:0.5, motionBlur: { strength:0.4, quality:1 }, ease:Bounce.easeOut, onComplete:showFreeSpinClips });
		else {
			TweenMax.to(FSPanel1_mc, 0.9, { x:203, delay:0.5, ease:Bounce.easeOut });
			TweenMax.to(FSPanel2_mc, 0.9, { x:400, delay:0.5, ease:Bounce.easeOut, onComplete:showFreeSpinClips });


Would be easiest if I could turn it off in TweenMax, but still have " motionBlur: { strength:0.4, quality:1 }," in the script, but just have it ignored.

I have to be able to dynamically turn this on and off.

Link to comment
Share on other sites

You're saying that you basically want to be able to break TweenMax so that it ignores certain commands (like motionBlur in this case)? No, sorry, that could cause all sorts of trouble (imagine if you subload a swf that purposely breaks certain things in TweenMax and causes your stuff to stop working). Why not simply edit your vars object so that you don't tell TweenMax to motionBlur if you don't want it to? That should be pretty simple to do. Do you need help with that?

Link to comment
Share on other sites

No, as you can see in my code example, that's what I'm already doing. I check a flag and then either execute Tweens with motion blur or without. It's just that I have this if check in dozens of places. No big deal but was hoping there was a secret to cleaner way to doing it.

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.