浏览代码

Fixed AS3 colors.

NathanSweet 12 年之前
父节点
当前提交
c03860383c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-as3/spine-as3/src/spine/SkeletonJson.as

+ 1 - 1
spine-as3/spine-as3/src/spine/SkeletonJson.as

@@ -246,7 +246,7 @@ public class SkeletonJson {
 	static private function toColor (hexString:String, colorIndex:int) : Number {
 		if (hexString.length != 8)
 			throw new ArgumentError("Color hexidecimal length must be 8, recieved: " + hexString);
-		return parseInt(hexString.substring(colorIndex * 2, 2), 16) / 255;
+		return parseInt(hexString.substring(colorIndex * 2, colorIndex * 2 + 2), 16) / 255;
 	}
 }