Hey guys.
I have a function I use when ever i want to move some thing in flash. it looks like this:
function MoveYourMc(target, newx, newy, speed)
{
var _loc1 = target;
var _loc4 = newx;
var _loc5 = newy;
var _loc3 = speed;
var _loc2 = mx.transitions.easing.Back.easeInOut;
myTweenY = new mx.transitions.Tween(_loc1, "_y", _loc2, _loc1._y, _loc5, _loc3);
myTweenX = new mx.transitions.Tween(_loc1, "_x", _loc2, _loc1._x, _loc4, _loc3);
} // End of the function
and i can then call this any where in my movie using:
InstanceName.onRollOver = function ()
{
MoveYourMc(InstanceName, 123, 456, 20);
};
which would move “InstanceName” to an _x of 123 and a _y of 456 at a speed of 20.
What i have been trying to do is make a similar function for the Glow Filter and im really struggling.
Im wondering if what i need to do is attach the glow filter to the instance before i try and tween it? any one got any ideas?
This is what i have been working with:
function GlowYourMc(target, newblurx, newblury, speed)
{
var _loc1 = target;
var _loc4 = newblurx;
var _loc5 = newblury;
var _loc3 = speed;
var _loc2 = mx.transitions.easing.Back.easeInOut;
target.GlowFilter(0xFFFFFF, 0, 0, 0, 2, 3, false, false);
myTweenY = new mx.transitions.Tween(_loc1, "blurY", _loc2, _loc1.blurY, _loc5, _loc3);
myTweenX = new mx.transitions.Tween(_loc1, "blurX", _loc2, _loc1.blurX, _loc4, _loc3);
} // End of the function
which i have been trying to execute with:
instanceName.onRollOver = function ()
{
GlowYourMc(instanceName, 50, 50, 20)
};