# \[AS3\] So, getting rid of tearing!

**URL:** https://forum.kirupa.com/t/as3-so-getting-rid-of-tearing/287024
**Category:** flash
**Created:** [April 24, 2009, 6:13pm UTC](https://forum.kirupa.com/t/as3-so-getting-rid-of-tearing/287024 "2009-04-24T18:13:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Valaran](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valaran](https://forum.kirupa.com/u/Valaran)
#### Post date: [April 24, 2009, 6:13pm UTC](https://forum.kirupa.com/t/as3-so-getting-rid-of-tearing/287024/1 "2009-04-24T18:13:08Z")

</div>

Hello,

okay so here is the deal, I’ve been trying to get rid of my incredibly annoying tearing for a while now, and I simply don’t know what to try anymore, it just wont go away!

I’ve tried switching around the tween timers (TweenMax), changing my frame rate and I’ve implemented something like a double buffer (I think…), but I’m still seeing tearing! ☹

I’ll post my rendering function, as it seems to be the most appropriate:

[AS]  
private function render(evt:Event = null):void  
{  
// This is a bitmapData object instantiated earlier in the class  
internal\_backBuffer.fillRect(new Rectangle(0, 0, internal\_backBuffer.width, internal\_backBuffer.height), internal\_bgFill);

```
var len:int = internal_displayList.length;
for(var i:int = 0; i &lt; len; i++)
{
	if(internal_displayList*.hidden) continue;
	internal_backBuffer.copyPixels(internal_displayList*.bitmapData, internal_displayList*.bitmapData.rect, new Point(internal_displayList*.x, internal_displayList*.y));
}

// This bitmapData object is tied directly to the class itself (which extends the Bitmap class)
// Basically this.bitmapData = internal_bitmapData;
internal_bitmapData.copyPixels(internal_backBuffer, internal_backBuffer.rect, new Point(0, 0));

```

}  
[/AS]

Any tips? If further code is needed, I’ll post whatever you need.

_edit_ Right now I have the frame rate set to 24, I’ve got TweenMax moving the object by 200y over 1 second… If that changes anything

Matt
