Hi. I have a similar question too. I'm writing sample code like below. But I cant't find out "Converting mx:Image to Bitmap". How should I ??? Please tell me.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="initApp()"> <mx:Script> <![CDATA[ import flash.display.Sprite; import flash.events.MouseEvent; import flash.display.Shape; import flash.util.trace; private function initApp():void { var child:Sprite = new Sprite(); child.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler); child.addEventListener(MouseEvent.MOUSE_UP,mouseUpHandler); child.graphics.beginFill(0xffffff); child.graphics.drawRect(0,0,200,200); child.graphics.endFill(); child.width = 200; child.height = 200; cvs.addChild(child); } private function mouseDownHandler(event:MouseEvent):void { var child:Sprite = Sprite(event.target); child.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); } private function mouseUpHandler(event:MouseEvent):void { var child:Sprite = Sprite(event.target); child.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); } private function mouseMoveHandler(event:MouseEvent):void { writeDot(event); event.updateAfterEvent(); } private function writeDot(event:MouseEvent):void { var sp:Shape = new Shape(); sp.graphics.beginFill(0x0000ff); sp.graphics.drawRect(0,0,2,2); sp.graphics.endFill(); sp.x = event.currentTarget.mouseX; sp.y = event.currentTarget.mouseY; var child:Sprite = Sprite(event.target); child.addChild(sp); } private function controlToBitamap(event:MouseEvent):void { // How should I write for converting mx:Image to Bitmap ?? } ]]> </mx:Script> <mx:Button x="10" y="218" label="Button" click="controlToBitamap(event)"/> <mx:Image id="cvs" x="10" y="10" width="200" height="200"/> </mx:Application> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

