Hey guys, first time poster, but have followed these borads for awhile. I’m having an issue with preloading into levels. I have a swf called preload.swf, I’m trying to get it to load navigation.swf, and BG.swf. but tried everything and cant figure out why its not working, heres a link to what it is doing, you’ll see that when you click on the news button, the news.swf opens on top, its loading the files, but not correctly into levels.
url to what the following code is doing: http://www.obscurilateris.com/test/test.html
heres what I got for AS on the preload.swf:
function init() {
var obj = new Object();
obj._x = 160;
obj._y = 315;
obj._visible = 0;
this.attachMovie(“preloader”, “preloader”, 6, obj);
this.createEmptyMovieClip(“navigation”, 8);
this.createEmptyMovieClip(“bg”, 1);
navigation.loadMovie(“navigation.swf”);
bg.loadMovie(“BG.swf”);
var preloadContent = new Array(this, navigation, bg);
preload(preloadContent);
}
function preload(preloadContent) {
preloader._visible = 1;
preloader.bar._xscale = 0;
preloader.display.text = “0% loaded”;
intervalId = setInterval(preloadCallback, 10, preloadContent);
}
function preloadCallback(preloadContent) {
var download = 0;
var downloaded = 0;
var percentLoaded = 0;
for (var i in preloadContent) {
if (preloadContent*.getBytesTotal() > 0) {
download += preloadContent*.getBytesTotal();
downloaded += preloadContent*.getBytesLoaded();
} else {
return;
}
percentLoaded = Math.ceil(downloaded / download * 100);
preloader.display.text = percentLoaded + “% loaded”;
preloader.bar._xscale = percentLoaded;
updateAfterEvent();
}
if (downloaded == download && download > 0) {
for (var i in preloadContent) {
preloadContent*.gotoAndStop(“run”);
}
clearInterval(intervalId);
preloader._visible = 0;
}
}
the prob should be in the top 10 lines, just cant see it, is there a better method?