SummerSquid
06-27-2007, 11:24 AM
as the title mentioned, i want to enlarge the image while this script is still running
var walk:Number = 0;
var visible:Number = 0;
function slideAcrossScreen()
{
if (walk <= 30)
{
photo._alpha = visible;
photo._x++;
walk++;
visible +=4 ;
}
else if (walk <= 80)
{
photo._x++;
walk++;
}
else if (walk <= 150)
{
photo._alpha = visible;
photo._x++;
walk++;
visible -=4 ;
}
else
{
photo._x=-800;
}
updateAfterEvent();
}
_root.onEnterFrame = function()
{
slideAcrossScreen();
};
i dont mind if the script is refined, of course the shorter the better. I choose to use script because the transition is smoother. I tried playing with _yscale and _xscale. But i dont really know where to put it. May anyone help me?
var walk:Number = 0;
var visible:Number = 0;
function slideAcrossScreen()
{
if (walk <= 30)
{
photo._alpha = visible;
photo._x++;
walk++;
visible +=4 ;
}
else if (walk <= 80)
{
photo._x++;
walk++;
}
else if (walk <= 150)
{
photo._alpha = visible;
photo._x++;
walk++;
visible -=4 ;
}
else
{
photo._x=-800;
}
updateAfterEvent();
}
_root.onEnterFrame = function()
{
slideAcrossScreen();
};
i dont mind if the script is refined, of course the shorter the better. I choose to use script because the transition is smoother. I tried playing with _yscale and _xscale. But i dont really know where to put it. May anyone help me?