Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    138
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Vertical Retrace Problem

    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

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Do you have code or an FLA to show?

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    138
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Here you go. This is the function

    Code:
    /**********************
            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);
    
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •