A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to turn off a blur filter?

  1. #1
    Member
    Join Date
    Mar 2001
    Posts
    44

    How to turn off a blur filter?

    Hi,

    I have managed to crib a script to blur a movie clip on my main stage, however i cant work out how to un-blur it, if you see what i mean.

    Im after the simplest way of bluring and unbluring a movie. I dont want to use the actual filters tab as the content of the movie clip will change.

    The code i have got to blur the clip is:

    Code:
     
    import flash.filters.BlurFilter;
    
    var blurX:Number = 20;
    var blurY:Number = 20;
    var quality:Number = 1;
    
    var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
    var filterArray:Array = new Array();
    filterArray.push(filter);
    _root.allContent.filters = filterArray;
    _root.allContent._alpha=40;
    Is there an easier way of doing this? and how can i remove all the filter settings? ideally toggle it on and off using a frame action.

    Hope that makes sense.
    Cheers
    Neil
    slammin

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Just use:

    Code:
    _root.allContent.filters = undefined
    To turn filters off

  3. #3
    Member
    Join Date
    Mar 2001
    Posts
    44
    Hi, thanks for that!
    i was trying a different way and it was caning the processor even though the effect had apparantly gone away

    Cheers
    Neil
    slammin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center