[Flashcoders] Smooth Scripted Blurs

2006-04-02 Thread lincoln
So I've got this clip that I want to apply a super smooth scripted  
blur.  This script does a great job however, the blur sort of pops at  
the end and than just becomes clear.Instead of smoothly making  
its transition from blurred to clear you see a noticeable transition  
from blurred to clear.  Am I missing something here that would make  
my clip, main_image_mc, smoothly transition?  Would you consider this  
the best practice for doing a blurred image-clear image transition?


import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;

   var myTween:Tween = new Tween(main_image_mc, blur,  
Regular.easeIn, 10, 0, 5, true);


   myTween.onMotionChanged = function() {
  main_image_mc.filters = [new BlurFilter(main_image_mc.blur,  
main_image_mc.blur, 5)];

   };

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Smooth Scripted Blurs

2006-04-02 Thread Zeh Fernando
from blurred to clear.  Am I missing something here that would make  my 
clip, main_image_mc, smoothly transition?  Would you consider this  the 
best practice for doing a blurred image-clear image transition?


It seems to work as expected here.

However, I don't know if that's what you're talking about, but consider 
this: a 10px blur is *very* similar to a 9px blur, while a 1px blur is very 
different from a 2px blur or, say, a 0px blur. This means that the bigger 
the blur value, the harder it is to actually make out the difference. When 
animating, if you want a smooth-looking animation, you have to make sure it 
spends more time on the lower values, and less time on bigger values.


On your case, this is done by using a different transition equation. You're 
going from 10 to 0 it seems, so since it starts big, you should use 
Regular.easeOut instead of Regular.easeIn. Then when animating the other way 
around, use Regular.easeOut. You could also experiment with othe other 
equations so see which one switchs your animation better.


HTH,
Zeh 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com