actionscript 3 - Multiply movieclip's content as if dragging corners? -


when put mouse on corner of image, can drag , image multiplied depending on how drag mouse. possible through code? example, lay mouse on corner of movieclip , see square cursor next mouse. drag , image duplicates bit. perspective transform?

you can use .beginbitmapfill()

here's demo:

var loader:loader = new loader(); loader.contentloaderinfo.addeventlistener(event.complete, ready); loader.load( new urlrequest("http://www.gravatar.com/avatar/") );  function ready(e:event):void {     var shape:shape = new shape();      shape.x = shape.y = 50;     shape.graphics.beginbitmapfill((loader.content bitmap).bitmapdata);      shape.graphics.lineto(100, 0);     shape.graphics.lineto(60, 120);     shape.graphics.lineto(-30, 50);     shape.graphics.lineto(0, 0);     shape.graphics.endfill();      addchild(shape); } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -