How to create img2 correctly?

2009/3/4 Hans Wichman <[email protected]>:
> Hi,
>
> you create a clip based on mc's width, called img.
> then you scale image, so its width is half of what it used to be.
> Then you draw img into img2. Img2's size is based on half the height and
> width, but the draw method ignores those transformation, so it draws an
> unscaled version of img in img2.
>
> regards
> JC
>
> On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya
> <[email protected]>wrote:
>
>> Hi
>> Please explain what is wrong in this code:
>> function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
>>        var visuals = new flash.display.BitmapData(from._width,
>> from._height);
>>        visuals.draw(from);
>>        target.attachBitmap(visuals, 1,"auto",true);
>>
>> }
>>
>> duplicateMovieClipImage(mc,img)
>> img._xscale=50;
>> img._yscale=50;
>> duplicateMovieClipImage(img,img2)
>> I expected that img1 and img2 have the same scale. Instead of that
>> img2 show 50% of mc.
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to