为什么文字不能显示手型鼠标指针?
如一下类
package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.display.Graphics;
import flash.events.MouseEvent;
public class drawRect extends Sprite {
public function drawRect() {
var Rect:Sprite=new Sprite;
var myString:String="Be Happy!";
var myText:TextField=new TextField;
myText.text=myString;
myText.height=18;
myText.selectable=false;
myText.x=20;
myText.y=40;
myText.mouseEnabled=false;
Rect.graphics.beginFill(0xff0000);
Rect.graphics.lineStyle(1,0,100);
Rect.graphics.drawRect(0,0,100,100);
Rect.addChild(myText);
Rect.buttonMode=true;
addChild(Rect);
Rect.addEventListener(MouseEvent.CLICK,clickEr);
}
private function clickEr(event:MouseEvent) {
trace(this.name);
}
}
}