I'm using Grant Skinner's gTween and need to capture the tweened clip using bitmapData, but can't figure out how to make it work!!
Here's the code, and I attached a sample...
Code://importing packages-------------------------- import flash.events.MouseEvent; import flash.display.Bitmap; import flash.display.BitmapData; import com.gskinner.motion.GTweeny; import fl.motion.easing.*; //var---------------------------------------------- var myBitmapData:BitmapData=new BitmapData(draw_mc.width,draw_mc.height); //Capture function--------------------------------- function capture(event:Event) { myBitmapData.draw(draw_mc); var bmp:Bitmap=new Bitmap(myBitmapData); this.addChild(bmp); draw_mc.visible=false; bmp.x=draw_mc.x; bmp.y=draw_mc.y+draw_mc.height; } function click_Handler(event:MouseEvent) { capture(event); } but.addEventListener(MouseEvent.MOUSE_DOWN, click_Handler); //rotate function stage.addEventListener(Event.ENTER_FRAME,handleTick); function handleTick(evt:Event):void { draw_mc.rotationY += ((mouseX-150)*+0.2 - draw_mc.rotationY)*0.45; }




Reply With Quote