0
votes

I have this piece of code that was being used like this

var _loc2 = new Color("_level1.shellContainer.INTERFACE.BALLOONS.p" + _loc3 +   ".balloon_mc");
_loc2.setRGB(_loc4);

I want to apply a glow filter to _level1.shellContainer.INTERFACE.BALLOONS.pLOC3.balloon_mc but I don't know how because I cant access balloon_mc because it needs _loc3 after BALLOONS.p and I don't know how you could add loc3 to this. If someone could tell me howto add loc3 or howto add glowfilter without having to do that it would be great. I'm also using actionscript 2.

2

2 Answers

1
votes

I'm pretty sure that's not the correct way to do this, but as you only posted one line of code, i can't help you on this issue. However, since you seem to want to change the colors of an object with a glowfilter, you can just use it like this:

object.filters = new Array(new GlowFilter(0xFFFFFF,1, 6, 6, 9, BitmapFilterQuality.LOW, false, overlap));

The parameters are:

GlowFilter(color:uint = 0xFF0000, alpha:Number = 1.0, blurX:Number = 6.0,
blurY:Number = 6.0, strength:Number = 2, quality:int = 1, inner:Boolean = false,
knockout:Boolean = false)

alpha : Number
The alpha transparency value for the color.
        blurX : Number
The amount of horizontal blur.
        blurY : Number
The amount of vertical blur.
        color : uint
The color of the glow.
        inner : Boolean
Specifies whether the glow is an inner glow.
        knockout : Boolean
Specifies whether the object has a knockout effect.
        quality : int
The number of times to apply the filter.
        strength : Number
The strength of the imprint or spread.

See : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.html

0
votes

Try

new Color(_level1.shellContainer.INTERFACE.BALLOONS['p' + _loc3].balloon_mc);