sharing small pieces of rocks or jewels I find on the way

In our company we have been working on t-shirt customization tool for long time. Here people can upload their own picture and it is placed on t-shirt. They can rotate, resize, move and many other features. Infact all features t-shirt tools now-a-days offer.

Normally the image gets pixelated like normal html. So, whether the image is bigger or smaller always it’s little crippled. One of our client asked to make it smoother. Then I found Flash supports bitmap smoothing. After working on the code, I have made a small code snippet which will make any movieclip loading smooth image.

Just paste in the movieclip actionscript

onClipEvent(load)
{
        if(this.getBytesLoaded()>100)
        {
            import flash.display.*;
            var bitmap:BitmapData = new BitmapData(_width,_height);
            bitmap.draw(this);
            this._quality = “BEST”;
            this.attachBitmap(bitmap,1,”auto”,true);
        }
}

Interesting, huh?

Advertisements

Comments on: "Smoothing image loaded in Flash" (1)

  1. its really Interesting and helpful to get height,width of movie clip after load another image into same movie clip and make the images smooth.
    thanks.
    …..
    Hasib

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: