Skip to content

Instantly share code, notes, and snippets.

@wolframkriesing
Created December 21, 2012 16:49
Show Gist options
  • Save wolframkriesing/4353971 to your computer and use it in GitHub Desktop.
Save wolframkriesing/4353971 to your computer and use it in GitHub Desktop.
var dict = new Dictionary;
dict[flash.display.ActionScriptVersion] = true;
var isFirstRun = true;
for (var key in dict) {
trace('key = ' + key);
if (isFirstRun) {
dict[flash.display.AVM1Movie] = true;
isFirstRun = false;
}
delete dict[key];
}
trace("dict[flash.display.AVM1Movie] = " + dict[flash.display.AVM1Movie]);
trace("dict[flash.display.ActionScriptVersion] = " + dict[flash.display.ActionScriptVersion]);
trace('======');
var dict = new Dictionary;
dict[flash.display.AVM1Movie] = true;
var isFirstRun = true;
for (var key in dict) {
trace('key = ' + key);
if (isFirstRun) {
dict[flash.display.ActionScriptVersion] = true;
isFirstRun = false;
}
delete dict[key];
}
trace("dict[flash.display.AVM1Movie] = " + dict[flash.display.AVM1Movie]);
trace("dict[flash.display.ActionScriptVersion] = " + dict[flash.display.ActionScriptVersion]);
/*
key = [class ActionScriptVersion]
dict[flash.display.AVM1Movie] = true
dict[flash.display.ActionScriptVersion] = undefined
======
key = [class AVM1Movie]
key = [class ActionScriptVersion]
dict[flash.display.AVM1Movie] = undefined
dict[flash.display.ActionScriptVersion] = undefined
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment