# Paint called too late

**URL:** https://forum.kirupa.com/t/paint-called-too-late/276435
**Category:** flash
**Created:** [November 27, 2008, 10:28am UTC](https://forum.kirupa.com/t/paint-called-too-late/276435 "2008-11-27T10:28:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![th3r1ddl3r](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@th3r1ddl3r](https://forum.kirupa.com/u/th3r1ddl3r)
#### Post date: [November 27, 2008, 10:28am UTC](https://forum.kirupa.com/t/paint-called-too-late/276435/1 "2008-11-27T10:28:10Z")

</div>

Hello all,

This fla has a round mc “objet” on frame1 and a rectangular mc “objet” on frame2.

This is the as3 code:

```auto

for (var i=0; i<=this.totalFrames; i++)  
{ 
 this.addFrameScript(i, null); </SPAN>
 this.addFrameScript(i, Paint);   
}     
 
function Paint() </SPAN>
{ 
  var colorTransform :ColorTransform = new ColorTransform(); </SPAN>
  colorTransform.color=5000; </SPAN>
  objet.transform.colorTransform=colorTransform;   
} 

```

The problem is that in the swf final, if i go frame by frame, each mc is flickering and we can see very quickly the old color before the new color.

How to solve this?
