A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Blur using Action Script

  1. #1
    Senior Member
    Join Date
    Nov 2003
    Posts
    385

    Blur using Action Script

    Can I blur an object using action script - Instead of creating a blurred version of it in a graphics program and using that?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    bitmaps or movieclips yes, see:
    BlurFilter (flash.filters.BlurFilter)
    BitmapData.applyFilter

    http://livedocs.adobe.com/flash/8/main/00001943.html

    gparis

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    Thanks - that's a start but still not clear enough for me. I need an example.
    I have added this to the top of my .as:

    import flash.filters.BlurFilter;

    So now say I wanted to blur the movie clip "getReady_mc" on mouseover. How do I apply the filter?

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    PHP Code:
    import flash.filters.BlurFilter;
    var 
    myBlurFilter = new flash.filters.BlurFilter(10103);
    getReady_mc.onRollOver = function() {
        
    this.filters = [myBlurFilter];
    }; 
    parameters are Blur X, Blur Y & Quality.

    gparis

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