Jump to content
Search Community

Semos

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Semos

  1. I've just started using AS & TweenLite / TweenMax. But I can't seem to get a blurFilter to apply.

     

     

    I have done this so far,

     

    package
    {
     
    //Import what I need to
     
    import com.greensock.TweenLite;
    import com.greensock.easing.Linear;
    import com.greensock.plugins.BlurFilterPlugin;
    import com.greensock.plugins.ColorTransformPlugin;
    import com.greensock.plugins.TweenPlugin;
     
    import org.flixel.FlxG;
    import org.flixel.FlxState;
    import org.flixel.plugin.photonstorm.FlxSpecialFX;
     
    TweenPlugin.activate([blurFilterPlugin]);
     
     
     
     
    public class ScreenTwo extends FlxState
    {
     
    private var Bwain:Brain;
    private var bg1:BackgroundOne;
     
    //Active plugins
    TweenPlugin.activate([blurFilterPlugin, ColorTransformPlugin]);
     
    override public function create():void
    {
    super.create();
     
    Bwain = new Brain(0,0);
    bg1 = new BackgroundOne(0,0);
    FlxG.addPlugin(new FlxSpecialFX);
     
     
    //Here I try to tween it.
    TweenLite.to(bg1, 3, {blurFilter:{blurX:10, blurY:10}});
    TweenLite.to(Bwain, 10,{x:-120, ease:Linear.ease});
    add(bg1);
    add(Bwain);
     
    makeRed();
    }
     
    private function makeRed():void
    {
    //TweenMax.to(Bwain,4, {ColorMatrixFilter:{colo
    }
    }
    }
     
     
     
    When I run it, the Linear tween works fine, but during the duration of the blur tween the program looks frozen and resumes after 3 second.

     

×
×
  • Create New...