From 4051dedd226bcbb7f6a2f42d47cfbff1101364e0 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 7 May 2013 01:13:34 +0200 Subject: [PATCH] Minor fixes. --- spine-as3/spine-as3/src/spine/Skin.as | 2 +- spine-as3/spine-as3/src/spine/attachments/RegionAttachment.as | 2 +- .../spine-starling/src/spine/starling/SkeletonSprite.as | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-as3/spine-as3/src/spine/Skin.as b/spine-as3/spine-as3/src/spine/Skin.as index 68d21d7e1..6cbdc9f31 100644 --- a/spine-as3/spine-as3/src/spine/Skin.as +++ b/spine-as3/spine-as3/src/spine/Skin.as @@ -38,7 +38,7 @@ public class Skin { var slotIndex:int = parseInt(key.substring(0, colon)); var name:String = key.substring(colon + 1); var slot:Slot = skeleton.slots[slotIndex]; - if (slot.attachment.name == name) { + if (slot.attachment && slot.attachment.name == name) { var attachment:Attachment = getAttachment(slotIndex, name); if (attachment != null) slot.attachment = attachment; diff --git a/spine-as3/spine-as3/src/spine/attachments/RegionAttachment.as b/spine-as3/spine-as3/src/spine/attachments/RegionAttachment.as index 5ef46cb7e..f0f663566 100644 --- a/spine-as3/spine-as3/src/spine/attachments/RegionAttachment.as +++ b/spine-as3/spine-as3/src/spine/attachments/RegionAttachment.as @@ -86,7 +86,7 @@ public dynamic class RegionAttachment extends Attachment { offset[Y4] = localYCos + localX2Sin; } - public function updateVertices (bone:Bone, vertices:Vector.) : void { + public function computeVertices (bone:Bone, vertices:Vector.) : void { var x:Number = bone.worldX; var y:Number = bone.worldY; var m00:Number = bone.m00; diff --git a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as index 74a93e5bc..47f8dc37e 100644 --- a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as +++ b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as @@ -41,7 +41,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable { var regionAttachment:RegionAttachment = slot.attachment as RegionAttachment; if (regionAttachment != null) { var vertices:Vector. = this.vertices; - regionAttachment.updateVertices(slot.bone, vertices); + regionAttachment.computeVertices(slot.bone, vertices); var r:Number = skeleton.r * slot.r; var g:Number = skeleton.g * slot.g; var b:Number = skeleton.b * slot.b; @@ -99,7 +99,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable { continue; var vertices:Vector. = this.vertices; - regionAttachment.updateVertices(slot.bone, vertices); + regionAttachment.computeVertices(slot.bone, vertices); value = vertices[0]; if (value < minX)