Handle asset files with no prefix
authorTom Hughes <tom@compton.nu>
Sat, 24 Mar 2012 16:47:55 +0000 (16:47 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 24 Mar 2012 19:07:33 +0000 (19:07 +0000)
net/systemeD/potlatch2/Preloader.as

index 3b2c9c8..804902f 100644 (file)
@@ -49,7 +49,11 @@ package net.systemeD.potlatch2 {
                                for each (var file:String in loaderInfo.parameters['assets'].split(';')) {
                                        var asset:Array=file.split('=');
                                        assetscount++;
-                                       FileBank.getInstance().addFromZip(asset[0],asset[1]);
+                    if (asset.length == 1) {
+                        FileBank.getInstance().addFromZip(asset[0]);
+                    } else {
+                        FileBank.getInstance().addFromZip(asset[0], asset[1]);
+                    }
                                }
                        }
         }