I have this loader set up but it won't recognize the level in order to get the bytesloaded and bytesTotal. I am sending the level as a parameter to the function
Why will this not work? The lev variable is not been read as a path but as a string. I have even used the [] operator to access the level but no joy. Can anyone help?Code://====== Inital Level Loader =============== levelLoader = function (file, level) { lev = "_level"+level; loader_holder._x = 600.0; loadMovieNum(file, level); trace("LEV :"+lev); progressCheck.onEnterFrame = function() { var percent = (lev.getBytesLoaded()/lev.getBytesTotal())*100; if (!isNan(percent)) { _root.loader_holder.bar._xscale = percent; } else { trace("0% loaded"); } if (percent == 100 && lev.getBytesLoaded()>1) { delete progressCheck.onEnterFrame; loader_holder._x = 846.0; trace("LEVEL: "+level+" "+"IS FULLY LOADED"); } }; }; levelLoader("squares.swf", 9);




Reply With Quote