hi all,
im quite new using tween class and is a little lost…
i want to use the tween class for my gallery, right now this is the code so when you pclick on a image then i “zoom”:
what i want is to implement tween class so it will be smoother…any help ?
var startX:Number = 0;
var startY:Number = 0;
var startW:Number = 0;
var startH:Number = 0;
var allowedH_ToZoom:Number = 340;
var allowedW_ToZoom:Number = 250;
var speed:Number = 1.5;
var endX:Number = 100;
var endY:Number = -5;
function zoomOutAnim()
{
if( product_image._height < allowedH_ToZoom && product_image._width < allowedW_ToZoom )
{
product_image._width *= 1.07;
product_image._height *= 1.07;
}
product_image._x += ( endX - product_image._x ) / speed
product_image._y += ( endY - product_image._y ) / speed;
product_image._alpha += ( 100 - product_image._alpha ) / speed
ExternalInterface.call(“console.debug”,"zooom out: “+ product_image._alpha+” - “+product_image._x+” - “+product_image._y+” - “+product_image._width+” - "+product_image._height);
if(Math.round(product_image._x) == endX && Math.round(product_image._y) == endY)
{
clearInterval( zoom_interval );
showHideOthers( true )
}
}