Browse Source

Fixed AS3 colors.

NathanSweet 12 years ago
parent
commit
c03860383c
1 changed files with 1 additions and 1 deletions
  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;
 	}
 }