From e0287eea3b0e8fcbaee70a6b03d6f496fdc9adc9 Mon Sep 17 00:00:00 2001 From: sucresk Date: Wed, 5 Aug 2015 16:15:46 +0800 Subject: [PATCH] fix index change bug --- src/dragonBones/fast/FastSlot.as | 5 ++++- src/dragonBones/objects/Object3DataParser.as | 8 ++++---- src/dragonBones/objects/ObjectDataParser.as | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/dragonBones/fast/FastSlot.as b/src/dragonBones/fast/FastSlot.as index c69abaf..6458e03 100644 --- a/src/dragonBones/fast/FastSlot.as +++ b/src/dragonBones/fast/FastSlot.as @@ -146,7 +146,10 @@ package dragonBones.fast targetArmature.resetAnimation() } } - + if (_isColorChanged) + { + updateDisplayColor(0, 0, 0, 0, 1, 1, 1, 1, true); + } var slotIndex:int = getDisplayIndex(); removeDisplayFromContainer(); return slotIndex; diff --git a/src/dragonBones/objects/Object3DataParser.as b/src/dragonBones/objects/Object3DataParser.as index a46ae24..152b034 100644 --- a/src/dragonBones/objects/Object3DataParser.as +++ b/src/dragonBones/objects/Object3DataParser.as @@ -508,10 +508,10 @@ package dragonBones.objects colorTransform.greenOffset = int(colorTransformObject[ConstValues.A_GREEN_OFFSET]); colorTransform.blueOffset = int(colorTransformObject[ConstValues.A_BLUE_OFFSET]); - colorTransform.alphaMultiplier = int(getNumber(colorTransformObject, ConstValues.A_ALPHA_MULTIPLIER,100)||100) * 0.01; - colorTransform.redMultiplier = int(getNumber(colorTransformObject,ConstValues.A_RED_MULTIPLIER,100)||100) * 0.01; - colorTransform.greenMultiplier = int(getNumber(colorTransformObject,ConstValues.A_GREEN_MULTIPLIER,100)||100) * 0.01; - colorTransform.blueMultiplier = int(getNumber(colorTransformObject,ConstValues.A_BLUE_MULTIPLIER,100)||100) * 0.01; + colorTransform.alphaMultiplier = int(getNumber(colorTransformObject, ConstValues.A_ALPHA_MULTIPLIER,100)) * 0.01; + colorTransform.redMultiplier = int(getNumber(colorTransformObject,ConstValues.A_RED_MULTIPLIER,100)) * 0.01; + colorTransform.greenMultiplier = int(getNumber(colorTransformObject,ConstValues.A_GREEN_MULTIPLIER,100)) * 0.01; + colorTransform.blueMultiplier = int(getNumber(colorTransformObject,ConstValues.A_BLUE_MULTIPLIER,100)) * 0.01; } } } diff --git a/src/dragonBones/objects/ObjectDataParser.as b/src/dragonBones/objects/ObjectDataParser.as index 215c000..5737676 100644 --- a/src/dragonBones/objects/ObjectDataParser.as +++ b/src/dragonBones/objects/ObjectDataParser.as @@ -435,10 +435,10 @@ colorTransform.greenOffset = int(colorTransformObject[ConstValues.A_GREEN_OFFSET]); colorTransform.blueOffset = int(colorTransformObject[ConstValues.A_BLUE_OFFSET]); - colorTransform.alphaMultiplier = int(getNumber(colorTransformObject, ConstValues.A_ALPHA_MULTIPLIER,100)||0) * 0.01; - colorTransform.redMultiplier = int(getNumber(colorTransformObject,ConstValues.A_RED_MULTIPLIER,100)||0) * 0.01; - colorTransform.greenMultiplier = int(getNumber(colorTransformObject,ConstValues.A_GREEN_MULTIPLIER,100)||0) * 0.01; - colorTransform.blueMultiplier = int(getNumber(colorTransformObject,ConstValues.A_BLUE_MULTIPLIER,100)||0) * 0.01; + colorTransform.alphaMultiplier = int(getNumber(colorTransformObject, ConstValues.A_ALPHA_MULTIPLIER,100)) * 0.01; + colorTransform.redMultiplier = int(getNumber(colorTransformObject,ConstValues.A_RED_MULTIPLIER,100)) * 0.01; + colorTransform.greenMultiplier = int(getNumber(colorTransformObject,ConstValues.A_GREEN_MULTIPLIER,100)) * 0.01; + colorTransform.blueMultiplier = int(getNumber(colorTransformObject,ConstValues.A_BLUE_MULTIPLIER,100)) * 0.01; } } }