# Fading bitmapData trail problem

**URL:** <https://forum.kirupa.com/t/fading-bitmapdata-trail-problem/283365>\
**Category:** flash\
**Created:** [March 5, 2009, 10:38am UTC](https://forum.kirupa.com/t/fading-bitmapdata-trail-problem/283365 "2009-03-05T10:38:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harm\_less](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@harm\_less](https://forum.kirupa.com/u/harm_less)\
**Post date:** [March 5, 2009, 10:38am UTC](https://forum.kirupa.com/t/fading-bitmapdata-trail-problem/283365/1 "2009-03-05T10:38:40Z")

</div>

Hello,

I trying to create a fade to transparent trail/follower and I’m doing this using ColorTransform.  
The problem is that it simply sets the alpha value of the bitmap to 0.7 al the time, it doesn’t fade at all.

```auto

import caurina.transitions.*;

var bmd:BitmapData = new BitmapData(550, 400, true, 0x00000000);
var bm:Bitmap = new Bitmap(bmd);
addChild(bm);

var bf:BlurFilter = new BlurFilter(5, 5, 3);
var cTransform:ColorTransform = new ColorTransform(1,1,1,0.7,0,0,0,0);

var ai:MovieClip = new MovieClip();
ai.graphics.beginFill(0xFF794B);
ai.graphics.drawCircle(50, 50, 30);
ai.graphics.endFill();
addChild(ai);

function mover():void
{
    Tweener.addTween(ai, {x:Math.random()*550,
                            y:Math.random()*400-100,
                            time:1,
                            onComplete:mover});
}

mover();

addEventListener(Event.ENTER_FRAME, loop);

function loop(e:Event):void
{
    bmd.draw(this);
    //bmd.applyFilter(bmd, bmd.rect, new Point(0,0), bf);
    bmd.colorTransform(bmd.rect,cTransform);
}

```

How can I make it so it fades to nothing after a while?

Harm
