View Full Version : Vertical Retrace Problem
neo_philiac
04-28-2008, 12:45 PM
Hello I am back!
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
p.s. Medyman: Thanks a lot. You have been a great help. I will keep asking question though ;) Everything working the way I want but I am getting this problem. I pretty sure you are very familiar with this problem.
Ciao!
Medyman
04-28-2008, 01:01 PM
Running it at 120 fps should be pretty smooth. What's your exact code? Performance of a flash file has a lot of external variables that can't necessarily be fixed with ActionScript.
It could just be that you're using the wrong animation type, though. So, post your code and we'll see what's up.
neo_philiac
04-28-2008, 04:53 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
Medyman
04-28-2008, 10:24 PM
Trig functions in AS...lovely! :D
I don't see anything wrong with the code. Is this function in the .fla you have on your site? I'll test to see if I'm getting performance issues on my machine. That'll let us know if it's a coding issue or if it's just your computer.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.