Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-05 Thread natalia Vikhtinskaya
How to create img2 correctly? 2009/3/4 Hans Wichman j.c.wich...@objectpainters.com: 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

Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-05 Thread Hans Wichman
Out of the top of my head: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); var m:Matrix = new Matrix(); //dont forget to import this m.scale (from._xscale/100,

RE: [Flashcoders] Duplicate Bitmap and scale question

2009-03-05 Thread Keith Reinfeld
[mailto:flashcoders- boun...@chattyfig.figleaf.com] On Behalf Of natalia Vikhtinskaya Sent: Thursday, March 05, 2009 5:54 AM To: Flash Coders List Subject: Re: [Flashcoders] Duplicate Bitmap and scale question How to create img2 correctly? 2009/3/4 Hans Wichman j.c.wich...@objectpainters.com: Hi, you

Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-05 Thread Hans Wichman
To: Flash Coders List Subject: Re: [Flashcoders] Duplicate Bitmap and scale question How to create img2 correctly? 2009/3/4 Hans Wichman j.c.wich...@objectpainters.com: Hi, you create a clip based on mc's width, called img. then you scale image, so its width is half of what

Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-04 Thread Hans Wichman
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

[Flashcoders] Duplicate Bitmap and scale question

2009-03-01 Thread natalia Vikhtinskaya
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); }