From c03860383cd23263512d6a6b00f34aec0dacd16b Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Wed, 5 Jun 2013 12:52:35 +0200 Subject: [PATCH] Fixed AS3 colors. --- spine-as3/spine-as3/src/spine/SkeletonJson.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-as3/spine-as3/src/spine/SkeletonJson.as b/spine-as3/spine-as3/src/spine/SkeletonJson.as index 065436c01..8bff6471f 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonJson.as +++ b/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; } }