From a8a7fa86b9492326e1d602a92235ad4fcc9fd009 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 8 Jul 2024 12:20:17 -0700 Subject: [PATCH] AnimateLibraryExporter: don't shadow className local variable To avoid confusion --- src/swf/exporters/AnimateLibraryExporter.hx | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/swf/exporters/AnimateLibraryExporter.hx b/src/swf/exporters/AnimateLibraryExporter.hx index 4bd520e..f0e420c 100644 --- a/src/swf/exporters/AnimateLibraryExporter.hx +++ b/src/swf/exporters/AnimateLibraryExporter.hx @@ -1212,57 +1212,57 @@ class AnimateLibraryExporter if (libraryData.symbols.exists(object.symbol)) { var childSymbol = libraryData.symbols.get(object.symbol); - var className = Reflect.hasField(childSymbol, "className") ? childSymbol.className : null; + var childClassName = Reflect.hasField(childSymbol, "className") ? childSymbol.className : null; - if (className == null) + if (childClassName == null) { var childType:SWFSymbolType = cast childSymbol.type; if (childType == SPRITE) { - className = "openfl.display.MovieClip"; + childClassName = "openfl.display.MovieClip"; } else if (childType == BITMAP) { - className = "openfl.display.BitmapData"; + childClassName = "openfl.display.BitmapData"; } else if (childType == SHAPE) { - className = "openfl.display.Shape"; + childClassName = "openfl.display.Shape"; } // else if (childType == BITMAP) // { - // className = "openfl.display.Bitmap"; + // childClassName = "openfl.display.Bitmap"; // } else if (childType == DYNAMIC_TEXT) { - className = "openfl.text.TextField"; + childClassName = "openfl.text.TextField"; } else if (childType == BUTTON) { - className = "openfl.display.SimpleButton"; + childClassName = "openfl.display.SimpleButton"; } else { - className = "Dynamic"; + childClassName = "Dynamic"; } } else { - if (StringTools.startsWith(className, "privatePkg.")) + if (StringTools.startsWith(childClassName, "privatePkg.")) { - className = "Dynamic"; + childClassName = "Dynamic"; hidden = true; } else { - className = SymbolUtils.formatClassName(className, prefix); + childClassName = SymbolUtils.formatClassName(childClassName, prefix); } } - if (className != null) + if (childClassName != null) { objectReferences[object.name] = true; - classProperties.push({name: object.name, type: className, hidden: true}); + classProperties.push({name: object.name, type: childClassName, hidden: true}); } } }