[]可以为线条设置hit(碰撞)区域吗?

var sp:Sprite = new Sprite();sp.graphics.clear();
sp.graphics.drawRect(0, 0, 100,100,"#ff0000" );
var hit:HitArea = new HitArea();
hit.hit = sp.graphics;
sp.hitArea = hit;
 
使用上面的方法可以给有填充 sp 添加触发区域!
 
但是如果sp只是绘制一条线(假设很宽的线),用这种方法似乎就不起作用了!有其他方法可以实现吗?
已邀请:

cuixueying

赞同来自:

hit区域不能是线条,需要是一个真正的显示区域!

要回复问题请先

商务合作
商务合作