A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Filters do not display on publish

  1. #1
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400

    resolved [RESOLVED] Filters do not display on publish

    Hi guys,

    Im using this filter to blur a movieclip on a click event.

    var filter:BlurFilter=new BlurFilter(4,4,BitmapFilterQuality.HIGH);
    var filters_array:Array=new Array();
    filters_array.push(filter);
    mainCradle.filters = filters_array;

    This runs fine when I go to control -> test

    But when published it doesn't apply the filter

    ..well it does but you caunt see it on screen.
    I created a dynamic text box and sent mainCradle.filters to it and it would appear that a filter is attached. Its just not using it.

    Any ideas?
    Can you attached listeners or something for when a filter has been added?

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Have you tried importing the filter package.

  3. #3
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    Hi,
    Yeah its in a class so i have to import the package...

    import flash.filters.BlurFilter;
    import flash.filters.BitmapFilterQuality;

  4. #4
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Try this. Make sure your dynamic text box has the instance name mainCradle.

    Code:
    var my_filter:BlurFilter=new BlurFilter(4,4,BitmapFilterQuality.HIGH);
    mainCradle.filters = [my_filter];

  5. #5
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    Thanks for that Ilike2
    That didnt work either.
    However I might of solved it.
    if you rightclick and zoom in on movie clip that has the blur effect on it, when you test it.
    In the output you get

    "Warning: Filter will not render. The DisplayObject's filtered dimensions (10105, 663) are too large to be drawn."

    I think the same thing is occuring when the swf is published except I dont need to zoom it in.


    If I unload some of the large objects out of the movieclip i am applying the fillter to, the problem stops.

    So Issue solved.... well I know why its happening, but i dont think I will be able to fix it. I need some of the objects in the movieclip to be as big as they are.

    Think I will have to write some nasty code that removes the larger items when a blur is applied.... nice.

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