Hi to all
I want create thumbnails(60x60) after loading big image: Here is a code:
function createTmb(from, target){
var visuals = new flash.display.BitmapData(from._width, from._height,
side);
visuals.draw(from);
var masked_mc:MovieClip = target.createEmptyMovieClip("masked_mc", 1);
masked_mc.attachBitmap(visuals, 1);
var ratio:Number=(from._width/from._height);
if (masked_mc._width<target._height){
masked_mc._width=side;
masked_mc._height=side*ratio;
} else {
masked_mc._height=side;
masked_mc._width=side*ratio;
}
var tmb_mask:MovieClip=target.attachMovie("tmb_mask","tmb_mask",2);
masked_mc.setMask(tmb_mask);
}
var tmb_mc:MovieClip = this.createEmptyMovieClip("tmb_mc",
this.getNextHighestDepth());
//some code for tmb_mc._x, tmb_mc._y
then
createTmb(graphics_mc, tmb_mc,60);
Is this correct way? Maybe there is better way for such things?
Thank you in advance!
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders