Hi,
Map needs two types : one for the key, one for the content.
For example, if you want a Map containing integers with strings as keys, you have to create it this way:
var map = new Map<String,Int>();
(well, there's StringMap for this example :P)
As a bonus, maps allow element access with the Array operator:
var map = new Map(); map["foo"] = 9; trace(map["foo"]); // 9 map["foo"] += 12; trace(map["foo"]); // 21
As a bonus, maps allow element access with the Array operator:
var map = new Map(); map["foo"] = 9; trace(map["foo"]); // 9 map["foo"] += 12; trace(map["foo"]); // 21
So when you do m["ss"] = "mm"; later, it assumes your map is a Map<String,String>
Using the new Map(); alone without doing anything with your map does not tel the compiler what kind of Map it is, so it fails