Hi buddies,
I made a bitmap object in a sprite but the startdrage method didn't run.
Do you have any suggestion?
These are my codes:
------
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.display.Shape;
import flash.display.GradientType;
import flash.geom.Rectangle;
public class test1 extends Sprite
{
private var bitmap:Bitmap;
private var bitmapData:BitmapData;
private var sprite:Sprite;
private var sprite2:Sprite;
public function test1()
{
sprite=new Sprite();
sprite.graphics.beginGradientFill(GradientType.RAD IAL,["0xff0000","0x00ff00","0x0000ff"],[100,100,100],[0,63,127])
sprite.graphics.drawCircle(0,0,60)
sprite.graphics.endFill()
sprite.y=200;
sprite.x=100;
bitmapData=new BitmapData(200,200,true,0xffffff);
bitmap=new Bitmap(bitmapData);
bitmapData.draw(sprite,new Matrix(),null,null,null,true);
sprite.addChild(bitmap);
addChild(sprite);
sprite.addEventListener(MouseEvent.MOUSE_UP,onClic k);
sprite.addEventListener(MouseEvent.MOUSE_UP,onRele ase);

}
private function onClick(event:MouseEvent):void{
trace("Mouse Down")
event.currentTarget.startDrag()

}
private function onRelease(event:MouseEvent):void{
trace("Mouse Up")
event.currentTarget.stopDrag();
}

}
}