0 Replies Latest reply on May 28, 2010 11:18 AM by BKUoP

    accessing/resetting GlowFilter parameters on Embedded SWF

    BKUoP

      Hello all,

           I am not sure if this is even possible b/c I know Flash/Flex expects parameters to be set before the object is added to the stage, but I have a swf with Sprites I'm embedding in Flex.  Inside these Sprites are dynamic text fields and some of the text fields have a GlowFilter on them, the requested feature is to be able to change the color property of the GlowFilter.  However, I don't know if there's a way to simply change the color property of the GlowFilter in the same way that you can, for example, change the color property of the text itself due to the fact that the Flash Player expects the properties to be set before the object is added to the stage.  Below is the code I've been playing around with but I get an error on build that says "1105: Target of assignment must be a reference value."  Any ideas of whether or not this is even do-able is much appreciated.

       

       

              var tempFilter:GlowFilter = new GlowFilter();
              trace(GlowFilter(comedySprite.getChildAt(2).filters[0]));
              GlowFilter(comedySprite.getChildAt(2).filters[0]) = tempFilter;
              tempFilter.color = 0x0000FF;
              GlowFilter(comedySprite.getChildAt(2).filters[0]) = tempFilter;