txt.blendMode = BlendMode.LAYER;
as3 textfield alpha
2011年7月25日 星期一 by Hu, Ching-Hsiang
Filed under
having
0
意見
AS3 distance between two points
2011年7月22日 星期五 by Hu, Ching-Hsiang
way 1
function DistanceTwoPoints(x1:Number, x2:Number, y1:Number, y2:Number):
Number {
var dx:Number = x1-x2;
var dy:Number = y1-y2;
return Math.sqrt(dx * dx + dy * dy);
}
way 2
var pt1:Point = new Point(circle1.x, circle1.y);
var pt2:Point = new Point(circle2.x, circle2.y);
var distance:Number = Point.distance(pt1, pt2);
訂閱:
文章 (Atom)