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
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,
[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
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
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
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);
}
6 matches
Mail list logo