Hi all! I just launched this site, and i’m having some serious issues with my preloader. It pops up briefly then completly disappers, the browser must be refreshed in order to view the opening 3-d animation.
Here is the code that I am using for this particular event.
MovieClip.prototype.LoadCube = function (targ, swf, func) {
targ.loadMovie (swf);
var trig = function () {
if (targ.getBytesLoaded () == targ.getBytesTotal ()) {
func (targ);
clearInterval (targ.inter);
}
};
targ.inter = setInterval (trig, 1);
};
var cube1func = function (targ) {
var t = _root.cubetainer;
var trig1 = function () {
targ.gotoAndStop ("beginMovie");
t.targ = _root.cubetainer2;
clearInterval (trig2);
};
var trig2 = setInterval (trig1, 1000);
};
var cube2func = function (targ) {
_root.smallloaded = true;
if (!_root.isplaying) {
_root.cubetainer.play ();
}
};
_root.LoadCube (_root.cubetainer, "largeCube.swf", cube1func);
_root.LoadCube (_root.cubetainer2, "smallCube.swf", cube2func);
_root.cubetainer2._visible = false;
logo_mc.onRelease = function () {
_root.cubetainer2.loadMovie ("smallCube1.swf");
_root.cubetainer._visible = false;
};
stop ();
I think what is causing this is the file size of the rotating cube.swf file, which is loaded into a empty_mc on my main stage. I recently purchased flash optimizer to reduce the file size, which worked out kinda ok.
Is there and error in the above code, which might cause the preloader to disappear like that?
Also! Is there a better method to reducing file size of animated swf files?
Thank you all,
Spyguy