PDA

View Full Version : Help with loader


Cyp1329
02-28-2007, 01:43 AM
I currently added a loader to my project, I have a seporate swf file which loads, everything works fine except when I load the game in that way the game doesn't register any mouse clicks. Anyone know what is causing this problem?

Here is the code for my loader:


siteLoader.loadMovie("http://www.blah.com/Blah.swf");
loadingBar._xscale = 1;

loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if (percentage == 99) {
delete this.onEnterFrame;
}
}




thanks guys,
cyp

CyanBlue
03-09-2007, 02:31 PM
Howdy and Welcome... :)

I do not see any problem with your preloading routine... and there is no way I can guess what might be causing the problem without seeing what you have...

My wild guess is that your problematic routines use absolute pathing like _root.blahblah to take care of the job, but you are loading that SWF into a movieClip with your loading routine, which might be breaking the functionality... Can you check to see if that applies to your case???

WhidbeyTomas
03-15-2007, 03:21 AM
I think that the preloader code is a red herring (e.g. not related to the problem). Your problem must be with the file that is not functioning. On the other hand, if this file works fine when loaded alone, but does not work well when loaded by another file, then there could be some relationship.

To get any help from your peers here, you will need to give us more information. You can show us the code on both files or your can zip them up and let us look at them.

It sounds like an interesting puzzle, so I hope you give us more.