diff --git a/src/scratch/ScratchRuntime.as b/src/scratch/ScratchRuntime.as index ac2552f..d2b41db 100644 --- a/src/scratch/ScratchRuntime.as +++ b/src/scratch/ScratchRuntime.as @@ -663,9 +663,9 @@ public class ScratchRuntime { public function renameSprite(newName:String):void { var obj:ScratchObj = app.viewedObj(); + var oldName:String = obj.objName; obj.objName = ''; newName = app.stagePane.unusedSpriteName(newName || 'Sprite1'); - var oldName:String = obj.objName; obj.objName = newName; for each (var lw:ListWatcher in app.viewedObj().lists) { lw.updateTitle();