move vector background handling to collection, and use singleton method. Now matches...
[potlatch2.git] / potlatch2.mxml
index 73da3b7e1b9956cb7d3fb159aebab715f5b65848..9d4d0e860d8b29f6f5d3efb5e34fd78a344fc04a 100644 (file)
 
             // Auto-load vector backgrounds from config
             // This could go spectacularly wrong if map.init completes before the event listener below is added
-            var vectorloader:AutoVectorBackground = new AutoVectorBackground(theMap);
-            theMap.addEventListener(MapEvent.INITIALISED, function(e:Event):void {vectorloader.load();});
+            theMap.addEventListener(MapEvent.INITIALISED, function(e:Event):void { VectorBackgrounds.instance().init(theMap); });
 
                        theMap.backdrop=b;
                        yahoo=new Yahoo(w,h,theMap);