PDA

View Full Version : [AS2] Problem with Game


DJRoberts
04-14-2009, 01:25 PM
Imagine this scenario:

There are ten games. The only thing that differs in these games are a couple of images. Now it seems stupid and unintelligent to make ten copies of each game.

I thought that if I had ten different folders with the specific images required for each game, then I could use some sort of variable to determine which folder to load.

My issue with this is that if I am externally loading images, there will be a load time (as these games are going to be played on the net) BUT I need for everything to be preloaded before the game file is executed. Can anyone help?

I hope I have explained things clearly enough.


Thanks

kkbbcute
04-14-2009, 02:37 PM
Just load all your files into an MC or something that is out of the stage area, set the visible property to false after you are done loading, and bring them in when you need them.

DJRoberts
04-14-2009, 03:00 PM
As in is it possible to use the library from a child swf in the parent swf.

A.swf loads B.swf using loadMovie
B.swf = child swf
A.swf = parent.swf (as it is doing the loading)


can A.swf attach an item from B.swf's Library?

kkbbcute
04-14-2009, 03:01 PM
As long as it has a unique identifier, it should be possible, though I'm not sure of the real code, sorry.

DJRoberts
04-14-2009, 03:17 PM
ok i got it sorted now thanks

Thanks for the replies