Results 1 to 4 of 4

Thread: Vertical Retrace Problem

  1. #1
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Vertical Retrace Problem

    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!

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

  3. #3
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    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);
    
    }

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Trig functions in AS...lovely!

    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.

Bookmarks

Posting Permissions

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