精确碰撞检测 bitmapData.hitTest
摘要:
如果要检测两个png图(有透明区域)精确碰撞,用bitmapData.hitTest方法:1.把两个位图(已放入mc,名叫mc1,mc2)转为bitmap.2.利用hitTest方法,接受参数1).mc1左上角的位置;2).mc1要检测的透明度(0-255);3).mc2左上角的位置;4).mc2要检测的透明度Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->var bmd1:BitmapData = new BitmapData(mc1.wi 阅读全文