...

# Vertical Retrace Problem

neo_philiac
04-28-2008, 02:46 PM
Hello!

I have this simple animation where I move a vertical line left to right using slideTo 100px @ 0.5s (MC Tween). I get this tearing of the line which tried fixing by increasing the frame rate to 120. But I still get the tearing. Also it more obvious in LCD than CRT. How do I get smooth animation?

Thanks

gnomeontherun
04-28-2008, 04:26 PM
Do you have code or an FLA to show?

neo_philiac
04-28-2008, 07:21 PM
Here you go. This is the function

/**********************
BOUNCE
***********************/
/* On press bounces the shape */

var x_init_pos:Number = new Number();
var y_init_pos:Number = new Number();
var x_pos:Number = new Number();
var y_pos:Number = new Number();

bounce_Button.onRelease = function() {

var bounce_speed = bounce_speed_txt.text;

// Calculate the postions

x_init_pos = tmp_big._x;
y_init_pos = tmp_big._y;

var bounce_depth:Number = bounce_depth_txt.text;
var degrees:Number = rot_text.text;
var radians = degrees*(Math.PI/180);

x_pos = int(x_init_pos + bounce_depth * Math.cos(radians));
y_pos = int(y_init_pos+ bounce_depth * Math.sin(radians));

//Call the mover function
mover();
}

function mover() {

var bounce_speed:Number = bounce_speed_txt.text;

tmp_big.slideTo(x_pos,y_pos, bounce_speed, "Linear");
tmp_big.slideTo(x_init_pos,y_init_pos, bounce_speed, "linear", bounce_speed, mover);

}

:D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum