Hi all,
I downloaded a piece of filter tweening code, modified it (added loop around
it) to tween mutiple clips on stage with the name (kText0, kText1, etc.) and
for some reason it only tweens the last clip.
After some debugging I found out where the problem lies. But when I compiled
the code in my head, everything seemed fine (probably have a buggy brain). Can
you spot what the problem is from the code below? How would you fix it?
import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.GlowFilter;
for (var i = 0; i < 5; ++i)
{
var mc = this["kText" + i];
var gf:GlowFilter = new GlowFilter(0x356D83, 100, 5, 5, 5, 3, false, false);
var gfBX:Tween = new Tween(gf, "blurX", Elastic.easeOut, 5, 5, 1, true);
var gfBY:Tween = new Tween(gf, "blurY", Elastic.easeOut, 5, 5, 1, true);
mc.onRollOver = function() {
gfBX.continueTo(30, 2);
gfBY.continueTo(30, 2);
};
mc.onRollOut = function() {
gfBX.continueTo(5, 2);
gfBY.continueTo(5, 2);
};
gfBX.onMotionChanged = function() {
mc.filters = [gf];
};
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com