dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How do I change glow color with this filter AS 3.0 script?

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    10

    How do I change glow color with this filter AS 3.0 script?

    I am so close to being done with my logo. Here is what I have so far followed by the actionscript.

    Its 18.1kb
    http://www.mpiclub.org/vumpler/test.swf

    Code:
    import flash.filters.GlowFilter;
    var dir:Number = 1;
    my_mc.blur = 10;
    my_mc.filters = [new GlowFilter()];
    my_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
    
    function enterFrameHandler(event:Event):void
    {   
        my_mc.blur += dir;
    
        if ((my_mc.blur >= 30) || (my_mc.blur <= 10)) {
            dir *= -1;
        }
    
        var filter_array:Array = my_mc.filters;
        filter_array[0].blurX = my_mc.blur;
        filter_array[0].blurY = my_mc.blur;
        my_mc.filters = filter_array;
    
    }
    The glow is red, but I don't want it to be red at all. I want it to be a black glow. However everything I've tried doesn't seem to work. I know how to specify the glow color by just using the menu's but it doesn't effect the AS. Is there a code to change it to black?

  2. #2
    Junior Member
    Join Date
    Aug 2007
    Posts
    10
    No one around today I guess :/

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